diff --git a/Package.swift b/Package.swift index 55da4f0b..50390b74 100644 --- a/Package.swift +++ b/Package.swift @@ -30,24 +30,14 @@ let package = Package( .target( name: "SDWebImage", dependencies: [], - path: ".", - sources: ["SDWebImage/Core", "SDWebImage/Private"], - publicHeadersPath: "SDWebImage/Core", - cSettings: [ - .headerSearchPath("SDWebImage/Core"), - .headerSearchPath("SDWebImage/Private") - ] + path: "SDWebImage", + exclude: ["MapKit"], + publicHeadersPath: "Core" ), .target( name: "SDWebImageMapKit", dependencies: ["SDWebImage"], - path: ".", - sources: ["SDWebImage/MapKit"], - publicHeadersPath: "SDWebImage/MapKit", - cSettings: [ - .headerSearchPath("SDWebImage/Core"), - .headerSearchPath("SDWebImage/Private") - ] + path: "SDWebImage/MapKit" ) ] ) diff --git a/SDWebImage/MapKit/MKAnnotationView+WebCache.m b/SDWebImage/MapKit/MKAnnotationView+WebCache.m index adc02a92..11b91b19 100644 --- a/SDWebImage/MapKit/MKAnnotationView+WebCache.m +++ b/SDWebImage/MapKit/MKAnnotationView+WebCache.m @@ -10,10 +10,7 @@ #if SD_UIKIT || SD_MAC -#import "objc/runtime.h" -#import "UIView+WebCacheOperation.h" #import "UIView+WebCache.h" -#import "SDInternalMacros.h" @implementation MKAnnotationView (WebCache) @@ -55,14 +52,13 @@ context:(nullable SDWebImageContext *)context progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock { - @weakify(self); + __weak typeof(self) wself = self; [self sd_internalSetImageWithURL:url placeholderImage:placeholder options:options context:context setImageBlock:^(UIImage * _Nullable image, NSData * _Nullable imageData, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { - @strongify(self); - self.image = image; + wself.image = image; } progress:progressBlock completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {