diff --git a/README.md b/README.md index 24db8487..dce54aa8 100644 --- a/README.md +++ b/README.md @@ -110,19 +110,27 @@ platform :ios, '7.0' pod 'SDWebImage', '~> 4.0' ``` -##### Swift +##### Swift and static framework -If you are using `Swift`, `Xcode 9+` and `CocoaPods` `1.5.0+`, you only need to set your target to `iOS 8+` if you need static library: +Swift project previously have to use `use_frameworks!` to make all Pods into dynamic framework to let CocoaPods works. + +However, start with `CocoaPods 1.5.0+` (with `Xcode 9+`), which supports to build both Objective-C && Swift code into static framework. You can use modular headers to use SDWebImage as static framework, without the need of `use_frameworks!`: ``` platform :ios, '8.0' +# Uncomment the next line when you want Pods as static framework +# use_modular_headers! +pod 'SDWebImage', :modular_headers => true ``` -If not, you still need to add `use_frameworks!` to use dynamic framework: +See more on [CocoaPods 1.5.0 — Swift Static Libraries](http://blog.cocoapods.org/CocoaPods-1.5.0/) + +If not, you still need to add `use_frameworks!` to use SDWebImage as dynamic framework: ``` platform :ios, '8.0' use_frameworks! +pod 'SDWebImage' ``` #### Subspecs @@ -184,3 +192,5 @@ All source code is licensed under the [MIT License](https://raw.github.com/SDWeb
+ +