Merge pull request #2604 from dreampiggy/revert_modular_framework

Revert modular framework
This commit is contained in:
DreamPiggy 2019-01-29 19:20:43 +08:00 committed by GitHub
commit 9b9b22dffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View File

@ -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
<p align="center">
<img src="Docs/SDWebImageSequenceDiagram.png" title="SDWebImage sequence diagram">
</p>

View File

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