Support the SwiftPM Objective-C user to use #improt <SDWebImage/SDWebImage.h>, by using the link to the public header files and construct the same folder layout

This commit is contained in:
DreamPiggy 2020-04-19 12:30:39 +08:00
parent e5adec920b
commit 1708ec67c1
63 changed files with 73 additions and 5 deletions

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View File

@ -32,8 +32,8 @@ let package = Package(
dependencies: [], dependencies: [],
path: "SDWebImage", path: "SDWebImage",
sources: ["Core", "Private"], sources: ["Core", "Private"],
publicHeadersPath: "Core",
cSettings: [ cSettings: [
.headerSearchPath("Core"),
.headerSearchPath("Private") .headerSearchPath("Private")
] ]
), ),

View File

@ -283,6 +283,12 @@ In the source files where you need to use the library, import the umbrella heade
#import <SDWebImage/SDWebImage.h> #import <SDWebImage/SDWebImage.h>
``` ```
It's also recommend to use the module import syntax, available for CocoaPods(enable `modular_headers`)/Carthage/SwiftPM.
```objecitivec
@import SDWebImage;
```
### Build Project ### Build Project
At this point your workspace should build without error. If you are having problem, post to the Issue and the At this point your workspace should build without error. If you are having problem, post to the Issue and the

View File

@ -6,12 +6,11 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
#import "SDWebImageCompat.h" #import <SDWebImage/SDWebImage.h>
#if SD_UIKIT || SD_MAC #if SD_UIKIT || SD_MAC
#import <MapKit/MapKit.h> #import <MapKit/MapKit.h>
#import "SDWebImageManager.h"
/** /**
* Integrates SDWebImage async downloading and caching of remote images with MKAnnotationView. * Integrates SDWebImage async downloading and caching of remote images with MKAnnotationView.

View File

@ -10,8 +10,6 @@
#if SD_UIKIT || SD_MAC #if SD_UIKIT || SD_MAC
#import "UIView+WebCache.h"
@implementation MKAnnotationView (WebCache) @implementation MKAnnotationView (WebCache)
- (void)sd_setImageWithURL:(nullable NSURL *)url { - (void)sd_setImageWithURL:(nullable NSURL *)url {

View File

@ -0,0 +1 @@
../../Core/NSButton+WebCache.h

View File

@ -0,0 +1 @@
../../Core/NSData+ImageContentType.h

View File

@ -0,0 +1 @@
../../Core/NSImage+Compatibility.h

View File

@ -0,0 +1 @@
../../Core/SDAnimatedImage.h

View File

@ -0,0 +1 @@
../../Core/SDAnimatedImagePlayer.h

View File

@ -0,0 +1 @@
../../Core/SDAnimatedImageRep.h

View File

@ -0,0 +1 @@
../../Core/SDAnimatedImageView+WebCache.h

View File

@ -0,0 +1 @@
../../Core/SDAnimatedImageView.h

View File

@ -0,0 +1 @@
../../Core/SDDiskCache.h

View File

@ -0,0 +1 @@
../../Core/SDGraphicsImageRenderer.h

View File

@ -0,0 +1 @@
../../Core/SDImageAPNGCoder.h

View File

@ -0,0 +1 @@
../../Core/SDImageCache.h

View File

@ -0,0 +1 @@
../../Core/SDImageCacheConfig.h

View File

@ -0,0 +1 @@
../../Core/SDImageCacheDefine.h

View File

@ -0,0 +1 @@
../../Core/SDImageCachesManager.h

View File

@ -0,0 +1 @@
../../Core/SDImageCoder.h

View File

@ -0,0 +1 @@
../../Core/SDImageCoderHelper.h

View File

@ -0,0 +1 @@
../../Core/SDImageCodersManager.h

View File

@ -0,0 +1 @@
../../Core/SDImageFrame.h

View File

@ -0,0 +1 @@
../../Core/SDImageGIFCoder.h

View File

@ -0,0 +1 @@
../../Core/SDImageGraphics.h

View File

@ -0,0 +1 @@
../../Core/SDImageHEICCoder.h

View File

@ -0,0 +1 @@
../../Core/SDImageIOAnimatedCoder.h

View File

@ -0,0 +1 @@
../../Core/SDImageIOCoder.h

View File

@ -0,0 +1 @@
../../Core/SDImageLoader.h

View File

@ -0,0 +1 @@
../../Core/SDImageLoadersManager.h

View File

@ -0,0 +1 @@
../../Core/SDImageTransformer.h

View File

@ -0,0 +1 @@
../../Core/SDMemoryCache.h

View File

@ -0,0 +1 @@
../../../WebImage/SDWebImage.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageCacheKeyFilter.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageCacheSerializer.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageCompat.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageDefine.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageDownloader.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageDownloaderConfig.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageDownloaderDecryptor.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageDownloaderOperation.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageDownloaderRequestModifier.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageDownloaderResponseModifier.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageError.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageIndicator.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageManager.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageOperation.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageOptionsProcessor.h

View File

@ -0,0 +1 @@
../../Core/SDWebImagePrefetcher.h

View File

@ -0,0 +1 @@
../../Core/SDWebImageTransition.h

View File

@ -0,0 +1 @@
../../Core/UIButton+WebCache.h

View File

@ -0,0 +1 @@
../../Core/UIImage+ExtendedCacheData.h

View File

@ -0,0 +1 @@
../../Core/UIImage+ForceDecode.h

View File

@ -0,0 +1 @@
../../Core/UIImage+GIF.h

View File

@ -0,0 +1 @@
../../Core/UIImage+MemoryCacheCost.h

View File

@ -0,0 +1 @@
../../Core/UIImage+Metadata.h

View File

@ -0,0 +1 @@
../../Core/UIImage+MultiFormat.h

View File

@ -0,0 +1 @@
../../Core/UIImage+Transform.h

View File

@ -0,0 +1 @@
../../Core/UIImageView+HighlightedWebCache.h

View File

@ -0,0 +1 @@
../../Core/UIImageView+WebCache.h

View File

@ -0,0 +1 @@
../../Core/UIView+WebCache.h

View File

@ -0,0 +1 @@
../../Core/UIView+WebCacheOperation.h