From cd7771351601f729166eef6fee9966da941aa3a5 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Wed, 26 Feb 2020 15:42:37 +0800 Subject: [PATCH 1/4] Totally remove the MapKit integration, including Source Code, Subspec, SwiftPM, fix the issue of SwiftPM on Xcode 11.4 Beta, make it scalable --- .travis.yml | 4 - .../SDWebImage Demo.xcodeproj/project.pbxproj | 58 ++---- Package.swift | 11 +- Podfile | 5 +- README.md | 15 +- SDWebImage.podspec | 10 -- SDWebImage.xcodeproj/project.pbxproj | 109 ----------- .../xcschemes/SDWebImageMapKit.xcscheme | 80 --------- .../MapKit/MKAnnotationView+WebCache.h | 170 ------------------ .../MapKit/MKAnnotationView+WebCache.m | 71 -------- .../MKAnnotationView+WebCache.h | 1 - .../SDWebImageMapKit/SDWebImageMapKit.h | 1 - .../project.pbxproj | 6 - WebImage/SDWebImage.h | 5 - WebImage/SDWebImageMapKit.h | 21 --- 15 files changed, 30 insertions(+), 537 deletions(-) delete mode 100644 SDWebImage.xcodeproj/xcshareddata/xcschemes/SDWebImageMapKit.xcscheme delete mode 100644 SDWebImageMapKit/MapKit/MKAnnotationView+WebCache.h delete mode 100644 SDWebImageMapKit/MapKit/MKAnnotationView+WebCache.m delete mode 120000 SDWebImageMapKit/include/SDWebImageMapKit/MKAnnotationView+WebCache.h delete mode 120000 SDWebImageMapKit/include/SDWebImageMapKit/SDWebImageMapKit.h delete mode 100644 WebImage/SDWebImageMapKit.h diff --git a/.travis.yml b/.travis.yml index 6c49adea..becd5868 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,10 +51,6 @@ script: - xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImage' -sdk appletvsimulator -configuration Debug | xcpretty -c - xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImage' -sdk watchsimulator -configuration Debug | xcpretty -c - xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImage' -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' -configuration Debug | xcpretty -c - - xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImageMapKit' -sdk macosx -configuration Debug | xcpretty -c - - xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImageMapKit' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c - - xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImageMapKit' -sdk appletvsimulator -configuration Debug | xcpretty -c - - xcodebuild build -project SDWebImage.xcodeproj -scheme 'SDWebImageMapKit' -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' -configuration Debug | xcpretty -c - echo Build the Demo apps - pod install diff --git a/Examples/SDWebImage Demo.xcodeproj/project.pbxproj b/Examples/SDWebImage Demo.xcodeproj/project.pbxproj index 8def2879..4f65ab0e 100644 --- a/Examples/SDWebImage Demo.xcodeproj/project.pbxproj +++ b/Examples/SDWebImage Demo.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -41,7 +41,6 @@ 95616EF6906FA4C794E780E4 /* Pods_SDWebImage_OSX_Demo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1299D5267E136DCF87A1A21A /* Pods_SDWebImage_OSX_Demo.framework */; }; AE96B96B254FB4A6A222D71E /* Pods_SDWebImage_TV_Demo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BEDA5EB5742642C924545A48 /* Pods_SDWebImage_TV_Demo.framework */; }; CF64B1471621CF4AAEC747B7 /* Pods_SDWebImage_iOS_Demo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 225ECB6E7CB8DB707B498522 /* Pods_SDWebImage_iOS_Demo.framework */; }; - DA248D44195470FD00390AB0 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 537612E3155ABA3C005750A4 /* MapKit.framework */; }; FB25FF804FC7C7868E4F9364 /* Pods_SDWebImage_Watch_Demo_Extension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0DBF9DAE0F88B4C7B529C575 /* Pods_SDWebImage_Watch_Demo_Extension.framework */; }; /* End PBXBuildFile section */ @@ -184,7 +183,6 @@ 537612AF155AB74D005750A4 /* DetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = ""; }; 537612B2155AB74D005750A4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MasterViewController.xib; sourceTree = ""; }; 537612B5155AB74D005750A4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/DetailViewController.xib; sourceTree = ""; }; - 537612E3155ABA3C005750A4 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; 537612E6155ABA44005750A4 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; 5992BFDBF29AB5CBCAC896FB /* Pods-SDWebImage OSX Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage OSX Demo.release.xcconfig"; path = "../Pods/Target Support Files/Pods-SDWebImage OSX Demo/Pods-SDWebImage OSX Demo.release.xcconfig"; sourceTree = ""; }; 5A56E15AF819F64FBF1F65A9 /* Pods-SDWebImage TV Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage TV Demo.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-SDWebImage TV Demo/Pods-SDWebImage TV Demo.debug.xcconfig"; sourceTree = ""; }; @@ -229,7 +227,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - DA248D44195470FD00390AB0 /* MapKit.framework in Frameworks */, 531041C1157EAC8F00BBABC3 /* ImageIO.framework in Frameworks */, 5376129A155AB74D005750A4 /* UIKit.framework in Frameworks */, 5376129C155AB74D005750A4 /* Foundation.framework in Frameworks */, @@ -359,7 +356,6 @@ isa = PBXGroup; children = ( 537612E6155ABA44005750A4 /* ImageIO.framework */, - 537612E3155ABA3C005750A4 /* MapKit.framework */, 53761299155AB74D005750A4 /* UIKit.framework */, 5376129B155AB74D005750A4 /* Foundation.framework */, 5376129D155AB74D005750A4 /* CoreGraphics.framework */, @@ -633,17 +629,12 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-SDWebImage OSX Demo/Pods-SDWebImage OSX Demo-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/SDWebImage-Core-MapKit-macOS/SDWebImage.framework", - "${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder-macOS/SDWebImageWebPCoder.framework", - "${BUILT_PRODUCTS_DIR}/libwebp-macOS/libwebp.framework", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SDWebImage OSX Demo/Pods-SDWebImage OSX Demo-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageWebPCoder.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework", + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SDWebImage OSX Demo/Pods-SDWebImage OSX Demo-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -655,17 +646,12 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-SDWebImage iOS Demo/Pods-SDWebImage iOS Demo-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/SDWebImage-Core-MapKit-iOS/SDWebImage.framework", - "${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder-iOS/SDWebImageWebPCoder.framework", - "${BUILT_PRODUCTS_DIR}/libwebp-iOS/libwebp.framework", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SDWebImage iOS Demo/Pods-SDWebImage iOS Demo-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageWebPCoder.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework", + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SDWebImage iOS Demo/Pods-SDWebImage iOS Demo-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -677,17 +663,12 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-SDWebImage Watch Demo Extension/Pods-SDWebImage Watch Demo Extension-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/SDWebImage-Core/SDWebImage.framework", - "${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder-watchOS/SDWebImageWebPCoder.framework", - "${BUILT_PRODUCTS_DIR}/libwebp-watchOS/libwebp.framework", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SDWebImage Watch Demo Extension/Pods-SDWebImage Watch Demo Extension-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageWebPCoder.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework", + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SDWebImage Watch Demo Extension/Pods-SDWebImage Watch Demo Extension-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -771,17 +752,12 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-SDWebImage TV Demo/Pods-SDWebImage TV Demo-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/SDWebImage-Core-MapKit-tvOS/SDWebImage.framework", - "${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder-tvOS/SDWebImageWebPCoder.framework", - "${BUILT_PRODUCTS_DIR}/libwebp-tvOS/libwebp.framework", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SDWebImage TV Demo/Pods-SDWebImage TV Demo-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageWebPCoder.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework", + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SDWebImage TV Demo/Pods-SDWebImage TV Demo-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; diff --git a/Package.swift b/Package.swift index b92b7ff4..f08223c5 100644 --- a/Package.swift +++ b/Package.swift @@ -15,10 +15,7 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "SDWebImage", - targets: ["SDWebImage"]), - .library( - name: "SDWebImageMapKit", - targets: ["SDWebImageMapKit"]) + targets: ["SDWebImage"]) ], dependencies: [ // Dependencies declare other packages that this package depends on. @@ -36,12 +33,6 @@ let package = Package( .headerSearchPath("Core"), .headerSearchPath("Private") ] - ), - .target( - name: "SDWebImageMapKit", - dependencies: ["SDWebImage"], - path: "SDWebImageMapKit", - sources: ["MapKit"] ) ] ) diff --git a/Podfile b/Podfile index 68c01b89..53873174 100644 --- a/Podfile +++ b/Podfile @@ -1,17 +1,16 @@ use_frameworks! def all_example_pods - pod 'SDWebImage/MapKit', :path => './' + pod 'SDWebImage', :path => './' pod 'SDWebImageWebPCoder', :git => 'https://github.com/SDWebImage/SDWebImageWebPCoder.git', :branch => 'master' end def watch_example_pods - pod 'SDWebImage/Core', :path => './' + pod 'SDWebImage', :path => './' pod 'SDWebImageWebPCoder', :git => 'https://github.com/SDWebImage/SDWebImageWebPCoder.git', :branch => 'master' end def all_test_pods - pod 'SDWebImage/MapKit', :path => './' pod 'Expecta' pod 'KVOController' end diff --git a/README.md b/README.md index 3417765b..b4b6563b 100644 --- a/README.md +++ b/README.md @@ -231,9 +231,16 @@ pod 'SDWebImage' #### Subspecs -There are 2 subspecs available now: `Core` and `MapKit` (this means you can install only some of the SDWebImage modules. By default, you get just `Core`, so if you need `MapKit`, you need to specify it). +From SDWebImage 5.6.0, the `MapKit` subspec have been moved into a standalone Git Repo: [SDWebImageMapKitPlugin](https://github.com/SDWebImage/SDWebImageMapKitPlugin). User who previouslly use the `MapKit` subspec should upgrade to use that instead. If you use SwiftPM or Carthage with Swift, you also need to change the imported module name (from `SDWebImageMapKit` into `SDWebImageMapKitPlugin`) -Podfile example: +``` +pod 'SDWebImage' +pod 'SDWebImageMapKitPlugin' +``` + +Currently we still keep the `Core` subspec because some downstream framework use it. However, in SDWebImage 6.0.0, the `Core` subspec may been totally removed or changed. Please inform the framework author to not write Podspec dependency like this `s.dependency 'SDWebImage/Core'`, just use `s.dependency 'SDWebImage'`. + +For SDWebImge 5.5.x and lower, there are 2 subspecs available now: `Core` and `MapKit` (this means you can install only some of the SDWebImage modules. By default, you get just `Core`, so if you need `MapKit`, you need to specify it). ``` pod 'SDWebImage/MapKit' @@ -245,13 +252,11 @@ pod 'SDWebImage/MapKit' To install with carthage, follow the instruction on [Carthage](https://github.com/Carthage/Carthage) -Carthage users can point to this repository and use whichever generated framework they'd like: SDWebImage, SDWebImageMapKit or both. - Make the following entry in your Cartfile: `github "SDWebImage/SDWebImage"` Then run `carthage update` If this is your first time using Carthage in the project, you'll need to go through some additional steps as explained [over at Carthage](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application). -> NOTE: At this time, Carthage does not provide a way to build only specific repository subcomponents (or equivalent of CocoaPods's subspecs). All components and their dependencies will be built with the above command. However, you don't need to copy frameworks you aren't using into your project. For instance, if you aren't using `SDWebImageMapKit`, feel free to delete that framework from the Carthage Build directory after `carthage update` completes. +> NOTE: At this time, Carthage does not provide a way to build only specific repository subcomponents (or equivalent of CocoaPods's subspecs). All components and their dependencies will be built with the above command. However, you don't need to copy frameworks you aren't using into your project. For instance, for SDWebImage 5.5.x and lower, if you aren't using `SDWebImageMapKit`, feel free to delete that framework from the Carthage Build directory after `carthage update` completes. ### Installation with Swift Package Manager (Xcode 11+) diff --git a/SDWebImage.podspec b/SDWebImage.podspec index 983d9090..d4440087 100644 --- a/SDWebImage.podspec +++ b/SDWebImage.podspec @@ -23,7 +23,6 @@ Pod::Spec.new do |s| s.requires_arc = true s.framework = 'ImageIO' - s.default_subspec = 'Core' s.pod_target_xcconfig = { @@ -35,13 +34,4 @@ Pod::Spec.new do |s| core.source_files = 'SDWebImage/Core/*.{h,m}', 'WebImage/SDWebImage.h', 'SDWebImage/Private/*.{h,m}' core.private_header_files = 'SDWebImage/Private/*.h' end - - s.subspec 'MapKit' do |mk| - mk.osx.deployment_target = '10.11' - mk.ios.deployment_target = '9.0' - mk.tvos.deployment_target = '9.0' - mk.source_files = 'SDWebImageMapKit/MapKit/*.{h,m}' - mk.framework = 'MapKit' - mk.dependency 'SDWebImage/Core' - end end diff --git a/SDWebImage.xcodeproj/project.pbxproj b/SDWebImage.xcodeproj/project.pbxproj index 87e5bae1..be965ec3 100644 --- a/SDWebImage.xcodeproj/project.pbxproj +++ b/SDWebImage.xcodeproj/project.pbxproj @@ -285,8 +285,6 @@ 53761314155AD0D5005750A4 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53FB893F14D35D1A0020B787 /* CoreGraphics.framework */; }; 53EDFB8C17623F7C00698166 /* UIImage+MultiFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = 53EDFB8917623F7C00698166 /* UIImage+MultiFormat.m */; }; 5D5B9145188EE8DD006D06BD /* NSData+ImageContentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D5B9141188EE8DD006D06BD /* NSData+ImageContentType.m */; }; - 806BE07C2142C4A200E02143 /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A2CADFF1AB4BB5300B6BC39 /* SDWebImage.framework */; }; - 806BE07E2142C65200E02143 /* SDWebImageMapKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 806BE07D2142C65200E02143 /* SDWebImageMapKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 807A122A1F89636300EC2A9B /* SDImageCodersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 807A12261F89636300EC2A9B /* SDImageCodersManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; 807A122E1F89636300EC2A9B /* SDImageCodersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 807A12271F89636300EC2A9B /* SDImageCodersManager.m */; }; 807A12301F89636300EC2A9B /* SDImageCodersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 807A12271F89636300EC2A9B /* SDImageCodersManager.m */; }; @@ -300,16 +298,6 @@ ABBE71A818C43B4D00B75E91 /* UIImageView+HighlightedWebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = ABBE71A618C43B4D00B75E91 /* UIImageView+HighlightedWebCache.m */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 806BE07F2142C6C400E02143 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 53922D66148C55810056699D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 4A2CADFE1AB4BB5300B6BC39; - remoteInfo = SDWebImage; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXCopyFilesBuildPhase section */ 326C15A122A4E8AD0001F663 /* Copy Headers */ = { isa = PBXCopyFilesBuildPhase; @@ -525,11 +513,8 @@ 53FB894814D35E9E0020B787 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 5D5B9140188EE8DD006D06BD /* NSData+ImageContentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+ImageContentType.h"; path = "Core/NSData+ImageContentType.h"; sourceTree = ""; }; 5D5B9141188EE8DD006D06BD /* NSData+ImageContentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+ImageContentType.m"; path = "Core/NSData+ImageContentType.m"; sourceTree = ""; }; - 806BE07D2142C65200E02143 /* SDWebImageMapKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImageMapKit.h; sourceTree = ""; }; 807A12261F89636300EC2A9B /* SDImageCodersManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SDImageCodersManager.h; path = Core/SDImageCodersManager.h; sourceTree = ""; }; 807A12271F89636300EC2A9B /* SDImageCodersManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SDImageCodersManager.m; path = Core/SDImageCodersManager.m; sourceTree = ""; }; - 80B6DFEE2142B71600BCB334 /* SDWebImageMapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDWebImageMapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 80B6DFF12142B77E00BCB334 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; A18A6CC5172DC28500419892 /* UIImage+GIF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIImage+GIF.h"; path = "Core/UIImage+GIF.h"; sourceTree = ""; }; A18A6CC6172DC28500419892 /* UIImage+GIF.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIImage+GIF.m"; path = "Core/UIImage+GIF.m"; sourceTree = ""; }; AB615301192DA24600A2D8E9 /* UIView+WebCacheOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIView+WebCacheOperation.h"; path = "Core/UIView+WebCacheOperation.h"; sourceTree = ""; }; @@ -559,14 +544,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 80B6DFB72142B71600BCB334 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 806BE07C2142C4A200E02143 /* SDWebImage.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -722,7 +699,6 @@ isa = PBXGroup; children = ( 4A2CAE031AB4BB5400B6BC39 /* SDWebImage.h */, - 806BE07D2142C65200E02143 /* SDWebImageMapKit.h */, 4A2CAE011AB4BB5400B6BC39 /* Supporting Files */, ); path = WebImage; @@ -754,7 +730,6 @@ children = ( 53761325155AD0D5005750A4 /* libSDWebImage.a */, 4A2CADFF1AB4BB5300B6BC39 /* SDWebImage.framework */, - 80B6DFEE2142B71600BCB334 /* SDWebImageMapKit.framework */, ); name = Products; sourceTree = ""; @@ -762,7 +737,6 @@ 53922D71148C55820056699D /* Frameworks */ = { isa = PBXGroup; children = ( - 80B6DFF12142B77E00BCB334 /* MapKit.framework */, 53FB893F14D35D1A0020B787 /* CoreGraphics.framework */, 53922D72148C55820056699D /* Foundation.framework */, 53FB894814D35E9E0020B787 /* UIKit.framework */, @@ -969,15 +943,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 80B6DFB82142B71600BCB334 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 3287E6D2244C0C1400007311 /* MKAnnotationView+WebCache.h in Headers */, - 806BE07E2142C65200E02143 /* SDWebImageMapKit.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ @@ -1016,25 +981,6 @@ productReference = 53761325155AD0D5005750A4 /* libSDWebImage.a */; productType = "com.apple.product-type.library.static"; }; - 80B6DF862142B71600BCB334 /* SDWebImageMapKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 80B6DFEB2142B71600BCB334 /* Build configuration list for PBXNativeTarget "SDWebImageMapKit" */; - buildPhases = ( - 80B6DF872142B71600BCB334 /* Sources */, - 80B6DFB72142B71600BCB334 /* Frameworks */, - 80B6DFB82142B71600BCB334 /* Headers */, - 80B6DFEA2142B71600BCB334 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 806BE0802142C6C400E02143 /* PBXTargetDependency */, - ); - name = SDWebImageMapKit; - productName = WebImage; - productReference = 80B6DFEE2142B71600BCB334 /* SDWebImageMapKit.framework */; - productType = "com.apple.product-type.framework"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -1068,7 +1014,6 @@ targets = ( 53761307155AD0D5005750A4 /* SDWebImage static */, 4A2CADFE1AB4BB5300B6BC39 /* SDWebImage */, - 80B6DF862142B71600BCB334 /* SDWebImageMapKit */, 326CA50C22BA14EF0033A92F /* SDWebImage XCFramework */, ); }; @@ -1082,13 +1027,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 80B6DFEA2142B71600BCB334 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -1299,24 +1237,8 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 80B6DF872142B71600BCB334 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3287E6D1244C0C1400007311 /* MKAnnotationView+WebCache.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 806BE0802142C6C400E02143 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 4A2CADFE1AB4BB5300B6BC39 /* SDWebImage */; - targetProxy = 806BE07F2142C6C400E02143 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin XCBuildConfiguration section */ 326CA50D22BA14EF0033A92F /* Debug */ = { isa = XCBuildConfiguration; @@ -1378,28 +1300,6 @@ }; name = Release; }; - 80B6DFEC2142B71600BCB334 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - INFOPLIST_FILE = WebImage/Info.plist; - SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvsimulator appletvos"; - TARGETED_DEVICE_FAMILY = "1,2,3"; - TVOS_DEPLOYMENT_TARGET = 9.2; - }; - name = Debug; - }; - 80B6DFED2142B71600BCB334 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - INFOPLIST_FILE = WebImage/Info.plist; - SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvsimulator appletvos"; - TARGETED_DEVICE_FAMILY = "1,2,3"; - TVOS_DEPLOYMENT_TARGET = 9.2; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -1439,15 +1339,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 80B6DFEB2142B71600BCB334 /* Build configuration list for PBXNativeTarget "SDWebImageMapKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 80B6DFEC2142B71600BCB334 /* Debug */, - 80B6DFED2142B71600BCB334 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ }; rootObject = 53922D66148C55810056699D /* Project object */; diff --git a/SDWebImage.xcodeproj/xcshareddata/xcschemes/SDWebImageMapKit.xcscheme b/SDWebImage.xcodeproj/xcshareddata/xcschemes/SDWebImageMapKit.xcscheme deleted file mode 100644 index ca581094..00000000 --- a/SDWebImage.xcodeproj/xcshareddata/xcschemes/SDWebImageMapKit.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SDWebImageMapKit/MapKit/MKAnnotationView+WebCache.h b/SDWebImageMapKit/MapKit/MKAnnotationView+WebCache.h deleted file mode 100644 index 30f5aed1..00000000 --- a/SDWebImageMapKit/MapKit/MKAnnotationView+WebCache.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - * This file is part of the SDWebImage package. - * (c) Olivier Poitrey - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -#import - -#if SD_UIKIT || SD_MAC - -#import - -/** - * Integrates SDWebImage async downloading and caching of remote images with MKAnnotationView. - */ -@interface MKAnnotationView (WebCache) - -/** - * Set the imageView `image` with an `url`. - * - * The download is asynchronous and cached. - * - * @param url The url for the image. - */ -- (void)sd_setImageWithURL:(nullable NSURL *)url NS_REFINED_FOR_SWIFT; - -/** - * Set the imageView `image` with an `url` and a placeholder. - * - * The download is asynchronous and cached. - * - * @param url The url for the image. - * @param placeholder The image to be set initially, until the image request finishes. - * @see sd_setImageWithURL:placeholderImage:options: - */ -- (void)sd_setImageWithURL:(nullable NSURL *)url - placeholderImage:(nullable UIImage *)placeholder NS_REFINED_FOR_SWIFT; - -/** - * Set the imageView `image` with an `url`, placeholder and custom options. - * - * The download is asynchronous and cached. - * - * @param url The url for the image. - * @param placeholder The image to be set initially, until the image request finishes. - * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. - */ - -- (void)sd_setImageWithURL:(nullable NSURL *)url - placeholderImage:(nullable UIImage *)placeholder - options:(SDWebImageOptions)options NS_REFINED_FOR_SWIFT; - -/** - * Set the imageView `image` with an `url`, placeholder, custom options and context. - * - * The download is asynchronous and cached. - * - * @param url The url for the image. - * @param placeholder The image to be set initially, until the image request finishes. - * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. - * @param context A context contains different options to perform specify changes or processes, see `SDWebImageContextOption`. This hold the extra objects which `options` enum can not hold. - */ - -- (void)sd_setImageWithURL:(nullable NSURL *)url - placeholderImage:(nullable UIImage *)placeholder - options:(SDWebImageOptions)options - context:(nullable SDWebImageContext *)context; - -/** - * Set the imageView `image` with an `url`. - * - * The download is asynchronous and cached. - * - * @param url The url for the image. - * @param completedBlock A block called when operation has been completed. This block has no return value - * and takes the requested UIImage as first parameter. In case of error the image parameter - * is nil and the second parameter may contain an NSError. The third parameter is a Boolean - * indicating if the image was retrieved from the local cache or from the network. - * The fourth parameter is the original image url. - */ -- (void)sd_setImageWithURL:(nullable NSURL *)url - completed:(nullable SDExternalCompletionBlock)completedBlock; - -/** - * Set the imageView `image` with an `url`, placeholder. - * - * The download is asynchronous and cached. - * - * @param url The url for the image. - * @param placeholder The image to be set initially, until the image request finishes. - * @param completedBlock A block called when operation has been completed. This block has no return value - * and takes the requested UIImage as first parameter. In case of error the image parameter - * is nil and the second parameter may contain an NSError. The third parameter is a Boolean - * indicating if the image was retrieved from the local cache or from the network. - * The fourth parameter is the original image url. - */ -- (void)sd_setImageWithURL:(nullable NSURL *)url - placeholderImage:(nullable UIImage *)placeholder - completed:(nullable SDExternalCompletionBlock)completedBlock NS_REFINED_FOR_SWIFT; - -/** - * Set the imageView `image` with an `url`, placeholder and custom options. - * - * The download is asynchronous and cached. - * - * @param url The url for the image. - * @param placeholder The image to be set initially, until the image request finishes. - * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. - * @param completedBlock A block called when operation has been completed. This block has no return value - * and takes the requested UIImage as first parameter. In case of error the image parameter - * is nil and the second parameter may contain an NSError. The third parameter is a Boolean - * indicating if the image was retrieved from the local cache or from the network. - * The fourth parameter is the original image url. - */ -- (void)sd_setImageWithURL:(nullable NSURL *)url - placeholderImage:(nullable UIImage *)placeholder - options:(SDWebImageOptions)options - completed:(nullable SDExternalCompletionBlock)completedBlock; - -/** - * Set the imageView `image` with an `url`, placeholder and custom options. - * - * The download is asynchronous and cached. - * - * @param url The url for the image. - * @param placeholder The image to be set initially, until the image request finishes. - * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. - * @param progressBlock A block called while image is downloading - * @note the progress block is executed on a background queue - * @param completedBlock A block called when operation has been completed. This block has no return value - * and takes the requested UIImage as first parameter. In case of error the image parameter - * is nil and the second parameter may contain an NSError. The third parameter is a Boolean - * indicating if the image was retrieved from the local cache or from the network. - * The fourth parameter is the original image url. - */ -- (void)sd_setImageWithURL:(nullable NSURL *)url - placeholderImage:(nullable UIImage *)placeholder - options:(SDWebImageOptions)options - progress:(nullable SDImageLoaderProgressBlock)progressBlock - completed:(nullable SDExternalCompletionBlock)completedBlock; - -/** - * Set the imageView `image` with an `url`, placeholder, custom options and context. - * - * The download is asynchronous and cached. - * - * @param url The url for the image. - * @param placeholder The image to be set initially, until the image request finishes. - * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. - * @param context A context contains different options to perform specify changes or processes, see `SDWebImageContextOption`. This hold the extra objects which `options` enum can not hold. - * @param progressBlock A block called while image is downloading - * @note the progress block is executed on a background queue - * @param completedBlock A block called when operation has been completed. This block has no return value - * and takes the requested UIImage as first parameter. In case of error the image parameter - * is nil and the second parameter may contain an NSError. The third parameter is a Boolean - * indicating if the image was retrieved from the local cache or from the network. - * The fourth parameter is the original image url. - */ -- (void)sd_setImageWithURL:(nullable NSURL *)url - placeholderImage:(nullable UIImage *)placeholder - options:(SDWebImageOptions)options - context:(nullable SDWebImageContext *)context - progress:(nullable SDImageLoaderProgressBlock)progressBlock - completed:(nullable SDExternalCompletionBlock)completedBlock; - -@end - -#endif diff --git a/SDWebImageMapKit/MapKit/MKAnnotationView+WebCache.m b/SDWebImageMapKit/MapKit/MKAnnotationView+WebCache.m deleted file mode 100644 index 4969c0ba..00000000 --- a/SDWebImageMapKit/MapKit/MKAnnotationView+WebCache.m +++ /dev/null @@ -1,71 +0,0 @@ -/* - * This file is part of the SDWebImage package. - * (c) Olivier Poitrey - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -#import "MKAnnotationView+WebCache.h" - -#if SD_UIKIT || SD_MAC - -@implementation MKAnnotationView (WebCache) - -- (void)sd_setImageWithURL:(nullable NSURL *)url { - [self sd_setImageWithURL:url placeholderImage:nil options:0 completed:nil]; -} - -- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder { - [self sd_setImageWithURL:url placeholderImage:placeholder options:0 completed:nil]; -} - -- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options { - [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:nil]; -} - -- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options context:(nullable SDWebImageContext *)context { - [self sd_setImageWithURL:url placeholderImage:placeholder options:options context:context progress:nil completed:nil]; -} - -- (void)sd_setImageWithURL:(nullable NSURL *)url completed:(nullable SDExternalCompletionBlock)completedBlock { - [self sd_setImageWithURL:url placeholderImage:nil options:0 completed:completedBlock]; -} - -- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder completed:(nullable SDExternalCompletionBlock)completedBlock { - [self sd_setImageWithURL:url placeholderImage:placeholder options:0 completed:completedBlock]; -} - -- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options completed:(nullable SDExternalCompletionBlock)completedBlock { - [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock]; -} - -- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock { - [self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock]; -} - -- (void)sd_setImageWithURL:(nullable NSURL *)url - placeholderImage:(nullable UIImage *)placeholder - options:(SDWebImageOptions)options - context:(nullable SDWebImageContext *)context - progress:(nullable SDImageLoaderProgressBlock)progressBlock - completed:(nullable SDExternalCompletionBlock)completedBlock { - __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) { - wself.image = image; - } - progress:progressBlock - completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) { - if (completedBlock) { - completedBlock(image, error, cacheType, imageURL); - } - }]; -} - -@end - -#endif diff --git a/SDWebImageMapKit/include/SDWebImageMapKit/MKAnnotationView+WebCache.h b/SDWebImageMapKit/include/SDWebImageMapKit/MKAnnotationView+WebCache.h deleted file mode 120000 index 28a11933..00000000 --- a/SDWebImageMapKit/include/SDWebImageMapKit/MKAnnotationView+WebCache.h +++ /dev/null @@ -1 +0,0 @@ -../../MapKit/MKAnnotationView+WebCache.h \ No newline at end of file diff --git a/SDWebImageMapKit/include/SDWebImageMapKit/SDWebImageMapKit.h b/SDWebImageMapKit/include/SDWebImageMapKit/SDWebImageMapKit.h deleted file mode 120000 index 8d192441..00000000 --- a/SDWebImageMapKit/include/SDWebImageMapKit/SDWebImageMapKit.h +++ /dev/null @@ -1 +0,0 @@ -../../../WebImage/SDWebImageMapKit.h \ No newline at end of file diff --git a/Tests/SDWebImage Tests.xcodeproj/project.pbxproj b/Tests/SDWebImage Tests.xcodeproj/project.pbxproj index b9c1fda2..df59d80f 100644 --- a/Tests/SDWebImage Tests.xcodeproj/project.pbxproj +++ b/Tests/SDWebImage Tests.xcodeproj/project.pbxproj @@ -557,13 +557,11 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Tests TV/Pods-Tests TV-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/SDWebImage-Core-MapKit-tvOS/SDWebImage.framework", "${BUILT_PRODUCTS_DIR}/Expecta-tvOS/Expecta.framework", "${BUILT_PRODUCTS_DIR}/KVOController-tvOS/KVOController.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Expecta.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KVOController.framework", ); @@ -597,13 +595,11 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Tests Mac/Pods-Tests Mac-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/SDWebImage-Core-MapKit-macOS/SDWebImage.framework", "${BUILT_PRODUCTS_DIR}/Expecta-macOS/Expecta.framework", "${BUILT_PRODUCTS_DIR}/KVOController-macOS/KVOController.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Expecta.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KVOController.framework", ); @@ -619,13 +615,11 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Tests iOS/Pods-Tests iOS-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/SDWebImage-Core-MapKit-iOS/SDWebImage.framework", "${BUILT_PRODUCTS_DIR}/Expecta-iOS/Expecta.framework", "${BUILT_PRODUCTS_DIR}/KVOController-iOS/KVOController.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Expecta.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KVOController.framework", ); diff --git a/WebImage/SDWebImage.h b/WebImage/SDWebImage.h index 0e568003..5d2baefd 100644 --- a/WebImage/SDWebImage.h +++ b/WebImage/SDWebImage.h @@ -82,8 +82,3 @@ FOUNDATION_EXPORT const unsigned char SDWebImageVersionString[]; #if __has_include() #import #endif - -// MapKit -#if __has_include() -#import -#endif diff --git a/WebImage/SDWebImageMapKit.h b/WebImage/SDWebImageMapKit.h deleted file mode 100644 index 84e43156..00000000 --- a/WebImage/SDWebImageMapKit.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * This file is part of the SDWebImage package. - * (c) Olivier Poitrey - * (c) Florent Vilmart - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -#import - -//! Project version number for SDWebImageMapKit. -FOUNDATION_EXPORT double SDWebImageMapKitVersionNumber; - -//! Project version string for SDWebImageMapKit. -FOUNDATION_EXPORT const unsigned char SDWebImageMapKitVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - -// MapKit -#import From 103701346d9915c244a8fa6a29de38fd302c44f0 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Wed, 26 Feb 2020 15:54:18 +0800 Subject: [PATCH 2/4] Update the readme to fix typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b4b6563b..9b9939e4 100644 --- a/README.md +++ b/README.md @@ -229,9 +229,9 @@ use_frameworks! pod 'SDWebImage' ``` -#### Subspecs +#### Subspecs and MapKit -From SDWebImage 5.6.0, the `MapKit` subspec have been moved into a standalone Git Repo: [SDWebImageMapKitPlugin](https://github.com/SDWebImage/SDWebImageMapKitPlugin). User who previouslly use the `MapKit` subspec should upgrade to use that instead. If you use SwiftPM or Carthage with Swift, you also need to change the imported module name (from `SDWebImageMapKit` into `SDWebImageMapKitPlugin`) +From SDWebImage 5.6.0, the `MapKit` subspec have been moved into a standalone Git Repo: [SDWebImageMapKitPlugin](https://github.com/SDWebImage/SDWebImageMapKitPlugin). User who previously use the `MapKit` subspec should upgrade to use that instead. If you use SwiftPM or Carthage with Swift, you also need to change the imported module name (from `SDWebImageMapKit` into `SDWebImageMapKitPlugin`. ``` pod 'SDWebImage' From b68f948b76cd767ceb2235c9b2938d76492e0c9c Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Wed, 26 Feb 2020 18:08:53 +0800 Subject: [PATCH 3/4] Move the test code of MapKit into SDWebImageMapKitPlugin and Fix for Podfile --- Podfile | 1 + Tests/Tests/SDWebCacheCategoriesTests.m | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/Podfile b/Podfile index 53873174..0156761a 100644 --- a/Podfile +++ b/Podfile @@ -11,6 +11,7 @@ def watch_example_pods end def all_test_pods + pod 'SDWebImage', :path => './' pod 'Expecta' pod 'KVOController' end diff --git a/Tests/Tests/SDWebCacheCategoriesTests.m b/Tests/Tests/SDWebCacheCategoriesTests.m index e8a30596..35b89271 100644 --- a/Tests/Tests/SDWebCacheCategoriesTests.m +++ b/Tests/Tests/SDWebCacheCategoriesTests.m @@ -53,22 +53,6 @@ } #endif -- (void)testMKAnnotationViewSetImageWithURL { - XCTestExpectation *expectation = [self expectationWithDescription:@"MKAnnotationView setImageWithURL"]; - - MKAnnotationView *annotationView = [[MKAnnotationView alloc] init]; - NSURL *originalImageURL = [NSURL URLWithString:kTestJPEGURL]; - [annotationView sd_setImageWithURL:originalImageURL - completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { - expect(image).toNot.beNil(); - expect(error).to.beNil(); - expect(originalImageURL).to.equal(imageURL); - expect(annotationView.image).to.equal(image); - [expectation fulfill]; - }]; - [self waitForExpectationsWithCommonTimeout]; -} - #if SD_UIKIT - (void)testUIButtonSetImageWithURLNormalState { XCTestExpectation *expectation = [self expectationWithDescription:@"UIButton setImageWithURL normalState"]; From fb50a4d489014fd56cf9358253f27356153dda86 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Tue, 24 Nov 2020 11:26:53 +0800 Subject: [PATCH 4/4] Update test case test35AnimatedImagePlaybackModeReversedBounce --- Tests/Tests/SDAnimatedImageTest.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/Tests/SDAnimatedImageTest.m b/Tests/Tests/SDAnimatedImageTest.m index 6a66d8de..ef082285 100644 --- a/Tests/Tests/SDAnimatedImageTest.m +++ b/Tests/Tests/SDAnimatedImageTest.m @@ -700,7 +700,7 @@ static BOOL _isCalled; i--; } - if (cnt > 3) { + if (cnt >= 2) { [expectation fulfill]; // Stop Animation to avoid extra callback [wimageView.player stopPlaying]; @@ -753,7 +753,7 @@ static BOOL _isCalled; i--; } - if (cnt > 3) { + if (cnt >= 2) { [expectation fulfill]; // Stop Animation to avoid extra callback [wimageView.player stopPlaying];