Let SD can be imported using static library by CocoaPods

This commit is contained in:
zhongwuzw 2018-12-03 10:58:24 +08:00
parent 2bdc51e65c
commit 72a34cf2cf
2 changed files with 11 additions and 1 deletions

View File

@ -110,7 +110,16 @@ platform :ios, '7.0'
pod 'SDWebImage', '~> 4.0' pod 'SDWebImage', '~> 4.0'
``` ```
If you are using Swift, be sure to add `use_frameworks!` and set your target to iOS 8+: ##### Swift
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:
```
platform :ios, '8.0'
```
If not, you still need to add `use_frameworks!` to use dynamic framework:
``` ```
platform :ios, '8.0' platform :ios, '8.0'
use_frameworks! use_frameworks!

View File

@ -23,6 +23,7 @@ Pod::Spec.new do |s|
s.requires_arc = true s.requires_arc = true
s.framework = 'ImageIO' s.framework = 'ImageIO'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
s.default_subspec = 'Core' s.default_subspec = 'Core'