Skip to content

Commit 00ce6b7

Browse files
authored
Merge pull request #5 from SDWebImage/fix_module_import
Fix the compatible issue when using the Static Library (CocoaPods) to install SDWebImage
2 parents fb46278 + d98a1dc commit 00ce6b7

5 files changed

Lines changed: 21 additions & 1 deletion

File tree

SDWebImageLinkPlugin/Classes/LPLinkView+WebCache.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
* file that was distributed with this source code.
77
*/
88

9+
#if __has_include(<SDWebImage/SDWebImage.h>)
10+
#import <SDWebImage/SDWebImage.h>
11+
#else
912
@import SDWebImage;
10-
@import LinkPresentation;
13+
#endif
14+
#import <LinkPresentation/LinkPresentation.h>
1115

1216
/**
1317
* Integrates SDWebImage async downloading and caching of remote images with LPLinkView.

SDWebImageLinkPlugin/Classes/NSImage+SDWebImageLinkPlugin.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
* file that was distributed with this source code.
77
*/
88

9+
#if __has_include(<SDWebImage/SDWebImage.h>)
10+
#import <SDWebImage/SDWebImage.h>
11+
#else
912
@import SDWebImage;
13+
#endif
1014

1115
#if SD_MAC
1216

SDWebImageLinkPlugin/Classes/SDImageLinkLoader.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
* file that was distributed with this source code.
77
*/
88

9+
#if __has_include(<SDWebImage/SDWebImage.h>)
10+
#import <SDWebImage/SDWebImage.h>
11+
#else
912
@import SDWebImage;
13+
#endif
1014

1115
/// A Rich Link loader by using the LinkPresentation framework, load any URL's rich link image, like Website URL, local file URL. See LinkPresentation framework description.
1216
@interface SDImageLinkLoader : NSObject <SDImageLoader>

SDWebImageLinkPlugin/Classes/SDWebImageLinkDefine.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
* file that was distributed with this source code.
77
*/
88

9+
#if __has_include(<SDWebImage/SDWebImage.h>)
10+
#import <SDWebImage/SDWebImage.h>
11+
#else
912
@import SDWebImage;
13+
#endif
1014

1115
/**
1216
A `LPLinkMetadata` object used to fetch image/icon for website. If you provide this value, we don't use `LPMetadataProvider` to fetch the website's metadata again, directlly use your prefetched metadata instead.

SDWebImageLinkPlugin/Classes/SDWebImageLinkError.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
* file that was distributed with this source code.
77
*/
88

9+
#if __has_include(<SDWebImage/SDWebImage.h>)
10+
#import <SDWebImage/SDWebImage.h>
11+
#else
912
@import SDWebImage;
13+
#endif
1014

1115
FOUNDATION_EXPORT NSErrorDomain const SDWebImageLinkErrorDomain;
1216

0 commit comments

Comments
 (0)