From 72a34cf2cf0a42009676018e75b6657e00dd271c Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Mon, 3 Dec 2018 10:58:24 +0800 Subject: [PATCH] Let SD can be imported using static library by CocoaPods --- README.md | 11 ++++++++++- SDWebImage.podspec | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e32aa3f..24db8487 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,16 @@ platform :ios, '7.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' use_frameworks! diff --git a/SDWebImage.podspec b/SDWebImage.podspec index 2005f7d4..3b2b49a0 100644 --- a/SDWebImage.podspec +++ b/SDWebImage.podspec @@ -23,6 +23,7 @@ Pod::Spec.new do |s| s.requires_arc = true s.framework = 'ImageIO' + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } s.default_subspec = 'Core'