diff --git a/.travis.yml b/.travis.yml index cb058a0..0493b95 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: objective-c -osx_image: xcode9.4 +osx_image: xcode11.2 env: global: @@ -15,10 +15,9 @@ notifications: before_install: - env - locale - - gem install cocoapods --no-rdoc --no-ri --no-document --quiet - - gem install xcpretty --no-rdoc --no-ri --no-document --quiet + - gem install cocoapods --no-document --quiet + - gem install xcpretty --no-document --quiet - pod --version - - pod setup --silent > /dev/null - pod repo update --silent - xcpretty --version - xcodebuild -version @@ -32,14 +31,14 @@ script: - echo Build example - pod install --project-directory=Example - - xcodebuild build -workspace Example/SDWebImagePhotosPlugin.xcworkspace -scheme SDWebImagePhotosPlugin-Example -sdk iphonesimulator -destination 'name=iPhone 8' ONLY_ACTIVE_ARCH=NO | xcpretty -c + - xcodebuild build -workspace Example/SDWebImagePhotosPlugin.xcworkspace -scheme SDWebImagePhotosPlugin-Example -destination 'platform=iOS Simulator,name=iPhone 11 Pro' -configuration Debug | xcpretty -c - echo Clean DerivedData + - rm -rf ~/Library/Developer/Xcode/DerivedData/ - mkdir DerivedData - - rm -rf ~/Library/Developer/Xcode/DerivedData - echo Run the tests - - xcodebuild test -workspace Example/SDWebImagePhotosPlugin.xcworkspace -scheme 'SDWebImagePhotosPlugin_Tests' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 8' -configuration Debug | xcpretty -c + - xcodebuild test -workspace Example/SDWebImagePhotosPlugin.xcworkspace -scheme 'SDWebImagePhotosPlugin_Tests' -destination 'platform=iOS Simulator,name=iPhone 11 Pro' -configuration Debug | xcpretty -c - mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/iOS after_success: diff --git a/Cartfile.resolved b/Cartfile.resolved index 98fdac5..45c72b9 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1 +1 @@ -github "SDWebImage/SDWebImage" "5.1.0" +github "SDWebImage/SDWebImage" "5.4.0" diff --git a/SDWebImagePhotosPlugin/Classes/SDImagePhotosLoader.h b/SDWebImagePhotosPlugin/Classes/SDImagePhotosLoader.h index c748aa6..6cdef53 100644 --- a/SDWebImagePhotosPlugin/Classes/SDImagePhotosLoader.h +++ b/SDWebImagePhotosPlugin/Classes/SDImagePhotosLoader.h @@ -6,8 +6,12 @@ * file that was distributed with this source code. */ +#if __has_include() +#import +#else @import SDWebImage; -@import Photos; +#endif +#import /** The imgae loader to load image asset from Photos library. You need to register the loader into manager firstly. Use `@import SDWebImagePhotosPlugin` to import full framework instead of each header. diff --git a/SDWebImagePhotosPlugin/Classes/SDWebImagePhotosDefine.h b/SDWebImagePhotosPlugin/Classes/SDWebImagePhotosDefine.h index d6e9c45..a82e4bb 100644 --- a/SDWebImagePhotosPlugin/Classes/SDWebImagePhotosDefine.h +++ b/SDWebImagePhotosPlugin/Classes/SDWebImagePhotosDefine.h @@ -6,7 +6,11 @@ * file that was distributed with this source code. */ +#if __has_include() +#import +#else @import SDWebImage; +#endif /** * The scheme when identifing the URL is Photos URL