Skip to content

Commit dc482c6

Browse files
authored
Merge pull request #16 from SDWebImage/fix_module_import
Fix the compatible issue when using the Static Library (CocoaPods) to install SDWebImage
2 parents 9675e98 + 63dd07e commit dc482c6

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ script:
4545

4646
- echo Build example
4747
- pod install --project-directory=Example
48-
- xcodebuild build -workspace Example/SDWebImageSVGCoder.xcworkspace -scheme 'SDWebImageSVGCoder-Example' -sdk iphonesimulator -destination 'name=iPhone 8' -configuration Debug | xcpretty -c
49-
- xcodebuild build -workspace Example/SDWebImageSVGCoder.xcworkspace -scheme 'SDWebImageSVGCoder-Example macOS' -sdk macosx -configuration Debug | xcpretty -c
48+
- xcodebuild build -workspace Example/SDWebImageSVGCoder.xcworkspace -scheme 'SDWebImageSVGCoder-Example' -destination 'platform=iOS Simulator,name=iPhone 11 Pro' -configuration Debug | xcpretty -c
49+
- xcodebuild build -workspace Example/SDWebImageSVGCoder.xcworkspace -scheme 'SDWebImageSVGCoder-Example macOS' -destination 'platform=macOS,arch=x86_64' -configuration Debug | xcpretty -c

SDWebImageSVGCoder/Classes/SDImageSVGCoder.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
// Created by DreamPiggy on 2018/9/27.
66
//
77

8+
#if __has_include(<SDWebImage/SDWebImage.h>)
9+
#import <SDWebImage/SDWebImage.h>
10+
#else
811
@import SDWebImage;
12+
#endif
913

1014
NS_ASSUME_NONNULL_BEGIN
1115

SDWebImageSVGCoder/Classes/SDWebImageSVGCoderDefine.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
// Created by DreamPiggy on 2018/10/11.
66
//
77

8+
#if __has_include(<SDWebImage/SDWebImage.h>)
9+
#import <SDWebImage/SDWebImage.h>
10+
#else
811
@import SDWebImage;
12+
#endif
913

1014
/**
1115
A BOOL value which specify whether we prefer the actual bitmap representation instead of vector representation for SVG image. This is because the UIImage on iOS 13+ (NSImage on macOS 10.15+) can use the vector image format, which support dynamic scale without losing any detail. However, for some image processing logic, user may need the actual bitmap representation to manage pixels. (NSNumber)

0 commit comments

Comments
 (0)