Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode9.4
osx_image: xcode11.2

env:
global:
Expand All @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "SDWebImage/SDWebImage" "5.1.0"
github "SDWebImage/SDWebImage" "5.4.0"
6 changes: 5 additions & 1 deletion SDWebImagePhotosPlugin/Classes/SDImagePhotosLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
* file that was distributed with this source code.
*/

#if __has_include(<SDWebImage/SDWebImage.h>)
#import <SDWebImage/SDWebImage.h>
#else
@import SDWebImage;
@import Photos;
#endif
#import <Photos/Photos.h>

/**
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.
Expand Down
4 changes: 4 additions & 0 deletions SDWebImagePhotosPlugin/Classes/SDWebImagePhotosDefine.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
* file that was distributed with this source code.
*/

#if __has_include(<SDWebImage/SDWebImage.h>)
#import <SDWebImage/SDWebImage.h>
#else
@import SDWebImage;
#endif

/**
* The scheme when identifing the URL is Photos URL
Expand Down