WatchOS support - just added a target and the conditional compiling - seems to work (pod lib lint works).
There is an issue, the SDWebImage watchOS target doesn't show the simulator, only Generic Device. Also need to add some demo and test code.
This commit is contained in:
parent
546a579c62
commit
3d122e550b
|
@ -3,6 +3,8 @@ Pod::Spec.new do |s|
|
||||||
s.version = '3.8.1'
|
s.version = '3.8.1'
|
||||||
s.ios.deployment_target = '7.0'
|
s.ios.deployment_target = '7.0'
|
||||||
s.tvos.deployment_target = '9.0'
|
s.tvos.deployment_target = '9.0'
|
||||||
|
s.watchos.deployment_target = '2.0'
|
||||||
|
|
||||||
s.license = 'MIT'
|
s.license = 'MIT'
|
||||||
s.summary = 'Asynchronous image downloader with cache support with an UIImageView category.'
|
s.summary = 'Asynchronous image downloader with cache support with an UIImageView category.'
|
||||||
s.homepage = 'https://github.com/rs/SDWebImage'
|
s.homepage = 'https://github.com/rs/SDWebImage'
|
||||||
|
@ -36,7 +38,7 @@ Pod::Spec.new do |s|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'GIF' do |gif|
|
s.subspec 'GIF' do |gif|
|
||||||
gif.ios.deployment_target = '6.0'
|
gif.ios.deployment_target = '7.0'
|
||||||
gif.source_files = 'SDWebImage/FLAnimatedImage/*.{h,m}'
|
gif.source_files = 'SDWebImage/FLAnimatedImage/*.{h,m}'
|
||||||
gif.dependency 'SDWebImage/Core'
|
gif.dependency 'SDWebImage/Core'
|
||||||
gif.dependency 'FLAnimatedImage', '~> 1.0'
|
gif.dependency 'FLAnimatedImage', '~> 1.0'
|
||||||
|
|
|
@ -267,6 +267,40 @@
|
||||||
431739591CDFC8B70008FEB9 /* mux.h in Headers */ = {isa = PBXBuildFile; fileRef = DA577CC81998E60B007367ED /* mux.h */; };
|
431739591CDFC8B70008FEB9 /* mux.h in Headers */ = {isa = PBXBuildFile; fileRef = DA577CC81998E60B007367ED /* mux.h */; };
|
||||||
4317395A1CDFC8B70008FEB9 /* mux_types.h in Headers */ = {isa = PBXBuildFile; fileRef = DA577CC91998E60B007367ED /* mux_types.h */; };
|
4317395A1CDFC8B70008FEB9 /* mux_types.h in Headers */ = {isa = PBXBuildFile; fileRef = DA577CC91998E60B007367ED /* mux_types.h */; };
|
||||||
4317395B1CDFC8B70008FEB9 /* types.h in Headers */ = {isa = PBXBuildFile; fileRef = DA577CCA1998E60B007367ED /* types.h */; };
|
4317395B1CDFC8B70008FEB9 /* types.h in Headers */ = {isa = PBXBuildFile; fileRef = DA577CCA1998E60B007367ED /* types.h */; };
|
||||||
|
431BB68C1D06D2C1006A3455 /* SDWebImageDownloaderOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 530E49E416460AE2002868E7 /* SDWebImageDownloaderOperation.m */; };
|
||||||
|
431BB68E1D06D2C1006A3455 /* SDWebImagePrefetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 53922D92148C56230056699D /* SDWebImagePrefetcher.m */; };
|
||||||
|
431BB6901D06D2C1006A3455 /* FLAnimatedImageView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 43CE75CF1CFE98E0006C64D0 /* FLAnimatedImageView+WebCache.m */; };
|
||||||
|
431BB6921D06D2C1006A3455 /* NSData+ImageContentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D5B9141188EE8DD006D06BD /* NSData+ImageContentType.m */; };
|
||||||
|
431BB69A1D06D2C1006A3455 /* SDWebImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 53922D8C148C56230056699D /* SDWebImageDownloader.m */; };
|
||||||
|
431BB6A31D06D2C1006A3455 /* UIImageView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 53922D96148C56230056699D /* UIImageView+WebCache.m */; };
|
||||||
|
431BB6AA1D06D2C1006A3455 /* SDWebImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 53922D8F148C56230056699D /* SDWebImageManager.m */; };
|
||||||
|
431BB6AC1D06D2C1006A3455 /* SDWebImageCompat.m in Sources */ = {isa = PBXBuildFile; fileRef = 5340674F167780C40042B59E /* SDWebImageCompat.m */; };
|
||||||
|
431BB6B11D06D2C1006A3455 /* UIView+WebCacheOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = AB615302192DA24600A2D8E9 /* UIView+WebCacheOperation.m */; };
|
||||||
|
431BB6B41D06D2C1006A3455 /* SDWebImageDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 53922D8A148C56230056699D /* SDWebImageDecoder.m */; };
|
||||||
|
431BB6B61D06D2C1006A3455 /* UIImage+WebP.m in Sources */ = {isa = PBXBuildFile; fileRef = 53EDFB921762547C00698166 /* UIImage+WebP.m */; };
|
||||||
|
431BB6B91D06D2C1006A3455 /* UIButton+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 53922D94148C56230056699D /* UIButton+WebCache.m */; };
|
||||||
|
431BB6BD1D06D2C1006A3455 /* UIImage+GIF.m in Sources */ = {isa = PBXBuildFile; fileRef = A18A6CC6172DC28500419892 /* UIImage+GIF.m */; };
|
||||||
|
431BB6C01D06D2C1006A3455 /* SDImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 53922D86148C56230056699D /* SDImageCache.m */; };
|
||||||
|
431BB6C41D06D2C1006A3455 /* UIImage+MultiFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = 53EDFB8917623F7C00698166 /* UIImage+MultiFormat.m */; };
|
||||||
|
431BB6C71D06D2C1006A3455 /* UIImageView+HighlightedWebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = ABBE71A618C43B4D00B75E91 /* UIImageView+HighlightedWebCache.m */; };
|
||||||
|
431BB6D71D06D2C1006A3455 /* UIImage+WebP.h in Headers */ = {isa = PBXBuildFile; fileRef = 53EDFB911762547C00698166 /* UIImage+WebP.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6D91D06D2C1006A3455 /* SDWebImageManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D8E148C56230056699D /* SDWebImageManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6DC1D06D2C1006A3455 /* UIButton+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D93148C56230056699D /* UIButton+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6DF1D06D2C1006A3455 /* FLAnimatedImageView+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 43CE75CE1CFE98E0006C64D0 /* FLAnimatedImageView+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6E11D06D2C1006A3455 /* SDWebImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A2CAE031AB4BB5400B6BC39 /* SDWebImage.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6E21D06D2C1006A3455 /* UIImageView+HighlightedWebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = ABBE71A518C43B4D00B75E91 /* UIImageView+HighlightedWebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6E31D06D2C1006A3455 /* SDImageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D85148C56230056699D /* SDImageCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6E61D06D2C1006A3455 /* UIImageView+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D95148C56230056699D /* UIImageView+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6E71D06D2C1006A3455 /* SDWebImageCompat.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D88148C56230056699D /* SDWebImageCompat.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6E91D06D2C1006A3455 /* SDWebImageDownloaderOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 530E49E316460AE2002868E7 /* SDWebImageDownloaderOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6EB1D06D2C1006A3455 /* UIView+WebCacheOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = AB615301192DA24600A2D8E9 /* UIView+WebCacheOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6EE1D06D2C1006A3455 /* NSData+ImageContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D5B9140188EE8DD006D06BD /* NSData+ImageContentType.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6EF1D06D2C1006A3455 /* SDWebImagePrefetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D91148C56230056699D /* SDWebImagePrefetcher.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6F01D06D2C1006A3455 /* SDWebImageOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 530E49E71646388E002868E7 /* SDWebImageOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6F61D06D2C1006A3455 /* UIImage+MultiFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 53EDFB8817623F7C00698166 /* UIImage+MultiFormat.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6F91D06D2C1006A3455 /* UIImage+GIF.h in Headers */ = {isa = PBXBuildFile; fileRef = A18A6CC5172DC28500419892 /* UIImage+GIF.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6FA1D06D2C1006A3455 /* SDWebImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D8B148C56230056699D /* SDWebImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
431BB6FC1D06D2C1006A3455 /* SDWebImageDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D89148C56230056699D /* SDWebImageDecoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
438096721CDFC08200DC626B /* MKAnnotationView+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 535699B415113E7300A4C397 /* MKAnnotationView+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
438096721CDFC08200DC626B /* MKAnnotationView+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 535699B415113E7300A4C397 /* MKAnnotationView+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
438096731CDFC08F00DC626B /* MKAnnotationView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 535699B515113E7300A4C397 /* MKAnnotationView+WebCache.m */; };
|
438096731CDFC08F00DC626B /* MKAnnotationView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 535699B515113E7300A4C397 /* MKAnnotationView+WebCache.m */; };
|
||||||
438096741CDFC09C00DC626B /* UIImage+WebP.h in Headers */ = {isa = PBXBuildFile; fileRef = 53EDFB911762547C00698166 /* UIImage+WebP.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
438096741CDFC09C00DC626B /* UIImage+WebP.h in Headers */ = {isa = PBXBuildFile; fileRef = 53EDFB911762547C00698166 /* UIImage+WebP.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
@ -359,6 +393,7 @@
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
00733A4C1BC487C000A5A117 /* SDWebImage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDWebImage.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
00733A4C1BC487C000A5A117 /* SDWebImage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDWebImage.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
431BB7031D06D2C1006A3455 /* SDWebImage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDWebImage.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
43CE75491CFE9427006C64D0 /* FLAnimatedImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLAnimatedImage.h; sourceTree = "<group>"; };
|
43CE75491CFE9427006C64D0 /* FLAnimatedImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLAnimatedImage.h; sourceTree = "<group>"; };
|
||||||
43CE754A1CFE9427006C64D0 /* FLAnimatedImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLAnimatedImage.m; sourceTree = "<group>"; };
|
43CE754A1CFE9427006C64D0 /* FLAnimatedImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLAnimatedImage.m; sourceTree = "<group>"; };
|
||||||
43CE754B1CFE9427006C64D0 /* FLAnimatedImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLAnimatedImageView.h; sourceTree = "<group>"; };
|
43CE754B1CFE9427006C64D0 /* FLAnimatedImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLAnimatedImageView.h; sourceTree = "<group>"; };
|
||||||
|
@ -491,6 +526,13 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
431BB6CA1D06D2C1006A3455 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
4A2CADFB1AB4BB5300B6BC39 /* Frameworks */ = {
|
4A2CADFB1AB4BB5300B6BC39 /* Frameworks */ = {
|
||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
|
@ -574,6 +616,7 @@
|
||||||
53761325155AD0D5005750A4 /* libSDWebImage.a */,
|
53761325155AD0D5005750A4 /* libSDWebImage.a */,
|
||||||
4A2CADFF1AB4BB5300B6BC39 /* SDWebImage.framework */,
|
4A2CADFF1AB4BB5300B6BC39 /* SDWebImage.framework */,
|
||||||
00733A4C1BC487C000A5A117 /* SDWebImage.framework */,
|
00733A4C1BC487C000A5A117 /* SDWebImage.framework */,
|
||||||
|
431BB7031D06D2C1006A3455 /* SDWebImage.framework */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
@ -848,6 +891,31 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
431BB6CB1D06D2C1006A3455 /* Headers */ = {
|
||||||
|
isa = PBXHeadersBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
431BB6D71D06D2C1006A3455 /* UIImage+WebP.h in Headers */,
|
||||||
|
431BB6D91D06D2C1006A3455 /* SDWebImageManager.h in Headers */,
|
||||||
|
431BB6DC1D06D2C1006A3455 /* UIButton+WebCache.h in Headers */,
|
||||||
|
431BB6DF1D06D2C1006A3455 /* FLAnimatedImageView+WebCache.h in Headers */,
|
||||||
|
431BB6E11D06D2C1006A3455 /* SDWebImage.h in Headers */,
|
||||||
|
431BB6E21D06D2C1006A3455 /* UIImageView+HighlightedWebCache.h in Headers */,
|
||||||
|
431BB6E31D06D2C1006A3455 /* SDImageCache.h in Headers */,
|
||||||
|
431BB6E61D06D2C1006A3455 /* UIImageView+WebCache.h in Headers */,
|
||||||
|
431BB6E71D06D2C1006A3455 /* SDWebImageCompat.h in Headers */,
|
||||||
|
431BB6E91D06D2C1006A3455 /* SDWebImageDownloaderOperation.h in Headers */,
|
||||||
|
431BB6EB1D06D2C1006A3455 /* UIView+WebCacheOperation.h in Headers */,
|
||||||
|
431BB6EE1D06D2C1006A3455 /* NSData+ImageContentType.h in Headers */,
|
||||||
|
431BB6EF1D06D2C1006A3455 /* SDWebImagePrefetcher.h in Headers */,
|
||||||
|
431BB6F01D06D2C1006A3455 /* SDWebImageOperation.h in Headers */,
|
||||||
|
431BB6F61D06D2C1006A3455 /* UIImage+MultiFormat.h in Headers */,
|
||||||
|
431BB6F91D06D2C1006A3455 /* UIImage+GIF.h in Headers */,
|
||||||
|
431BB6FA1D06D2C1006A3455 /* SDWebImageDownloader.h in Headers */,
|
||||||
|
431BB6FC1D06D2C1006A3455 /* SDWebImageDecoder.h in Headers */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
4A2CADFC1AB4BB5300B6BC39 /* Headers */ = {
|
4A2CADFC1AB4BB5300B6BC39 /* Headers */ = {
|
||||||
isa = PBXHeadersBuildPhase;
|
isa = PBXHeadersBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
|
@ -986,6 +1054,24 @@
|
||||||
productReference = 00733A4C1BC487C000A5A117 /* SDWebImage.framework */;
|
productReference = 00733A4C1BC487C000A5A117 /* SDWebImage.framework */;
|
||||||
productType = "com.apple.product-type.framework";
|
productType = "com.apple.product-type.framework";
|
||||||
};
|
};
|
||||||
|
431BB6891D06D2C1006A3455 /* SDWebImage watchOS */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 431BB7001D06D2C1006A3455 /* Build configuration list for PBXNativeTarget "SDWebImage watchOS" */;
|
||||||
|
buildPhases = (
|
||||||
|
431BB68A1D06D2C1006A3455 /* Sources */,
|
||||||
|
431BB6CA1D06D2C1006A3455 /* Frameworks */,
|
||||||
|
431BB6CB1D06D2C1006A3455 /* Headers */,
|
||||||
|
431BB6FF1D06D2C1006A3455 /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = "SDWebImage watchOS";
|
||||||
|
productName = "WebImage tvOS";
|
||||||
|
productReference = 431BB7031D06D2C1006A3455 /* SDWebImage.framework */;
|
||||||
|
productType = "com.apple.product-type.framework";
|
||||||
|
};
|
||||||
4A2CADFE1AB4BB5300B6BC39 /* SDWebImage iOS */ = {
|
4A2CADFE1AB4BB5300B6BC39 /* SDWebImage iOS */ = {
|
||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 4A2CAE121AB4BB5400B6BC39 /* Build configuration list for PBXNativeTarget "SDWebImage iOS" */;
|
buildConfigurationList = 4A2CAE121AB4BB5400B6BC39 /* Build configuration list for PBXNativeTarget "SDWebImage iOS" */;
|
||||||
|
@ -1054,6 +1140,7 @@
|
||||||
53761307155AD0D5005750A4 /* SDWebImage */,
|
53761307155AD0D5005750A4 /* SDWebImage */,
|
||||||
4A2CADFE1AB4BB5300B6BC39 /* SDWebImage iOS */,
|
4A2CADFE1AB4BB5300B6BC39 /* SDWebImage iOS */,
|
||||||
00733A4B1BC487C000A5A117 /* SDWebImage tvOS */,
|
00733A4B1BC487C000A5A117 /* SDWebImage tvOS */,
|
||||||
|
431BB6891D06D2C1006A3455 /* SDWebImage watchOS */,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/* End PBXProject section */
|
/* End PBXProject section */
|
||||||
|
@ -1066,6 +1153,13 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
431BB6FF1D06D2C1006A3455 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
4A2CADFD1AB4BB5300B6BC39 /* Resources */ = {
|
4A2CADFD1AB4BB5300B6BC39 /* Resources */ = {
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
|
@ -1163,6 +1257,29 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
431BB68A1D06D2C1006A3455 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
431BB68C1D06D2C1006A3455 /* SDWebImageDownloaderOperation.m in Sources */,
|
||||||
|
431BB68E1D06D2C1006A3455 /* SDWebImagePrefetcher.m in Sources */,
|
||||||
|
431BB6901D06D2C1006A3455 /* FLAnimatedImageView+WebCache.m in Sources */,
|
||||||
|
431BB6921D06D2C1006A3455 /* NSData+ImageContentType.m in Sources */,
|
||||||
|
431BB69A1D06D2C1006A3455 /* SDWebImageDownloader.m in Sources */,
|
||||||
|
431BB6A31D06D2C1006A3455 /* UIImageView+WebCache.m in Sources */,
|
||||||
|
431BB6AA1D06D2C1006A3455 /* SDWebImageManager.m in Sources */,
|
||||||
|
431BB6AC1D06D2C1006A3455 /* SDWebImageCompat.m in Sources */,
|
||||||
|
431BB6B11D06D2C1006A3455 /* UIView+WebCacheOperation.m in Sources */,
|
||||||
|
431BB6B41D06D2C1006A3455 /* SDWebImageDecoder.m in Sources */,
|
||||||
|
431BB6B61D06D2C1006A3455 /* UIImage+WebP.m in Sources */,
|
||||||
|
431BB6B91D06D2C1006A3455 /* UIButton+WebCache.m in Sources */,
|
||||||
|
431BB6BD1D06D2C1006A3455 /* UIImage+GIF.m in Sources */,
|
||||||
|
431BB6C01D06D2C1006A3455 /* SDImageCache.m in Sources */,
|
||||||
|
431BB6C41D06D2C1006A3455 /* UIImage+MultiFormat.m in Sources */,
|
||||||
|
431BB6C71D06D2C1006A3455 /* UIImageView+HighlightedWebCache.m in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
4A2CADFA1AB4BB5300B6BC39 /* Sources */ = {
|
4A2CADFA1AB4BB5300B6BC39 /* Sources */ = {
|
||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
|
@ -1321,7 +1438,6 @@
|
||||||
ENABLE_TESTABILITY = YES;
|
ENABLE_TESTABILITY = YES;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
INFOPLIST_FILE = WebImage/Info.plist;
|
INFOPLIST_FILE = WebImage/Info.plist;
|
||||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).tvos";
|
PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).tvos";
|
||||||
|
@ -1350,7 +1466,6 @@
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
INFOPLIST_FILE = WebImage/Info.plist;
|
INFOPLIST_FILE = WebImage/Info.plist;
|
||||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).tvos";
|
PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).tvos";
|
||||||
|
@ -1364,6 +1479,62 @@
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
431BB7011D06D2C1006A3455 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
DEFINES_MODULE = YES;
|
||||||
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
INFOPLIST_FILE = WebImage/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).watchos";
|
||||||
|
PRODUCT_NAME = SDWebImage;
|
||||||
|
SDKROOT = watchos;
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
SUPPORTED_PLATFORMS = "watchsimulator watchos";
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
TARGETED_DEVICE_FAMILY = 3;
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
VERSION_INFO_PREFIX = "";
|
||||||
|
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
431BB7021D06D2C1006A3455 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
DEFINES_MODULE = YES;
|
||||||
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
INFOPLIST_FILE = WebImage/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.$(PRODUCT_NAME:rfc1034identifier).watchos";
|
||||||
|
PRODUCT_NAME = SDWebImage;
|
||||||
|
SDKROOT = watchos;
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
SUPPORTED_PLATFORMS = "watchsimulator watchos";
|
||||||
|
TARGETED_DEVICE_FAMILY = 3;
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
VERSION_INFO_PREFIX = "";
|
||||||
|
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
4A2CAE131AB4BB5400B6BC39 /* Debug */ = {
|
4A2CAE131AB4BB5400B6BC39 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
@ -1450,7 +1621,6 @@
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
"DEBUG=1",
|
"DEBUG=1",
|
||||||
"SD_WEBP=1",
|
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
);
|
);
|
||||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||||
|
@ -1506,10 +1676,7 @@
|
||||||
);
|
);
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
|
||||||
"SD_WEBP=1",
|
|
||||||
"$(inherited)",
|
|
||||||
);
|
|
||||||
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
|
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
|
||||||
|
@ -1548,6 +1715,15 @@
|
||||||
defaultConfigurationIsVisible = 0;
|
defaultConfigurationIsVisible = 0;
|
||||||
defaultConfigurationName = Release;
|
defaultConfigurationName = Release;
|
||||||
};
|
};
|
||||||
|
431BB7001D06D2C1006A3455 /* Build configuration list for PBXNativeTarget "SDWebImage watchOS" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
431BB7011D06D2C1006A3455 /* Debug */,
|
||||||
|
431BB7021D06D2C1006A3455 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
4A2CAE121AB4BB5400B6BC39 /* Build configuration list for PBXNativeTarget "SDWebImage iOS" */ = {
|
4A2CAE121AB4BB5400B6BC39 /* Build configuration list for PBXNativeTarget "SDWebImage iOS" */ = {
|
||||||
isa = XCConfigurationList;
|
isa = XCConfigurationList;
|
||||||
buildConfigurations = (
|
buildConfigurations = (
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0730"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "431BB6891D06D2C1006A3455"
|
||||||
|
BuildableName = "SDWebImage.framework"
|
||||||
|
BlueprintName = "SDWebImage watchOS"
|
||||||
|
ReferencedContainer = "container:SDWebImage.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "431BB6891D06D2C1006A3455"
|
||||||
|
BuildableName = "SDWebImage.framework"
|
||||||
|
BlueprintName = "SDWebImage watchOS"
|
||||||
|
ReferencedContainer = "container:SDWebImage.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "431BB6891D06D2C1006A3455"
|
||||||
|
BuildableName = "SDWebImage.framework"
|
||||||
|
BlueprintName = "SDWebImage watchOS"
|
||||||
|
ReferencedContainer = "container:SDWebImage.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -6,6 +6,7 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
|
|
||||||
#if COCOAPODS
|
#if COCOAPODS
|
||||||
@import FLAnimatedImage;
|
@import FLAnimatedImage;
|
||||||
|
@ -139,3 +140,5 @@
|
||||||
- (void)sd_cancelCurrentImageLoad;
|
- (void)sd_cancelCurrentImageLoad;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
|
|
||||||
#import "FLAnimatedImageView+WebCache.h"
|
#import "FLAnimatedImageView+WebCache.h"
|
||||||
#import "objc/runtime.h"
|
#import "objc/runtime.h"
|
||||||
|
@ -117,3 +118,5 @@ static char imageURLKey;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -21,14 +21,17 @@
|
||||||
- (nonnull instancetype)init {
|
- (nonnull instancetype)init {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (self) {
|
if (self) {
|
||||||
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(removeAllObjects) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(removeAllObjects) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)dealloc {
|
- (void)dealloc {
|
||||||
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -126,7 +129,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
||||||
_fileManager = [NSFileManager new];
|
_fileManager = [NSFileManager new];
|
||||||
});
|
});
|
||||||
|
|
||||||
#if TARGET_OS_IOS
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
// Subscribe to app events
|
// Subscribe to app events
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
selector:@selector(clearMemory)
|
selector:@selector(clearMemory)
|
||||||
|
@ -211,7 +214,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
||||||
NSData *data = imageData;
|
NSData *data = imageData;
|
||||||
|
|
||||||
if (image && (recalculate || !data)) {
|
if (image && (recalculate || !data)) {
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
|
||||||
// We need to determine if the image is a PNG or a JPEG
|
// We need to determine if the image is a PNG or a JPEG
|
||||||
// PNGs are easier to detect because they have a unique signature (http://www.w3.org/TR/PNG-Structure.html)
|
// PNGs are easier to detect because they have a unique signature (http://www.w3.org/TR/PNG-Structure.html)
|
||||||
// The first eight bytes of a PNG file always contain the following (decimal) values:
|
// The first eight bytes of a PNG file always contain the following (decimal) values:
|
||||||
|
@ -589,6 +592,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
- (void)backgroundCleanDisk {
|
- (void)backgroundCleanDisk {
|
||||||
Class UIApplicationClass = NSClassFromString(@"UIApplication");
|
Class UIApplicationClass = NSClassFromString(@"UIApplication");
|
||||||
if(!UIApplicationClass || ![UIApplicationClass respondsToSelector:@selector(sharedApplication)]) {
|
if(!UIApplicationClass || ![UIApplicationClass respondsToSelector:@selector(sharedApplication)]) {
|
||||||
|
@ -608,6 +612,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
||||||
bgTask = UIBackgroundTaskInvalid;
|
bgTask = UIBackgroundTaskInvalid;
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
- (NSUInteger)getSize {
|
- (NSUInteger)getSize {
|
||||||
__block NSUInteger size = 0;
|
__block NSUInteger size = 0;
|
||||||
|
|
|
@ -18,17 +18,18 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !TARGET_OS_IPHONE
|
#if !TARGET_OS_IPHONE
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
#ifndef UIImage
|
#ifndef UIImage
|
||||||
#define UIImage NSImage
|
#define UIImage NSImage
|
||||||
#endif
|
#endif
|
||||||
#ifndef UIImageView
|
#ifndef UIImageView
|
||||||
#define UIImageView NSImageView
|
#define UIImageView NSImageView
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
#import <UIKit/UIKit.h>
|
#if TARGET_OS_WATCH
|
||||||
|
#import <WatchKit/WatchKit.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NS_ENUM
|
#ifndef NS_ENUM
|
||||||
|
|
|
@ -27,7 +27,11 @@ inline UIImage *SDScaledImageForKey(NSString * _Nullable key, UIImage * _Nullabl
|
||||||
return [UIImage animatedImageWithImages:scaledImages duration:image.duration];
|
return [UIImage animatedImageWithImages:scaledImages duration:image.duration];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
#if TARGET_OS_WATCH
|
||||||
|
if ([[WKInterfaceDevice currentDevice] respondsToSelector:@selector(screenScale)]) {
|
||||||
|
#else
|
||||||
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) {
|
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) {
|
||||||
|
#endif
|
||||||
CGFloat scale = 1;
|
CGFloat scale = 1;
|
||||||
if (key.length >= 8) {
|
if (key.length >= 8) {
|
||||||
NSRange range = [key rangeOfString:@"@2x."];
|
NSRange range = [key rangeOfString:@"@2x."];
|
||||||
|
|
|
@ -41,7 +41,7 @@ typedef NSMutableDictionary<NSString *, id> SDCallbacksDictionary;
|
||||||
@property (strong, atomic, nullable) NSThread *thread;
|
@property (strong, atomic, nullable) NSThread *thread;
|
||||||
@property (SDDispatchQueueSetterSementics, nonatomic, nullable) dispatch_queue_t barrierQueue;
|
@property (SDDispatchQueueSetterSementics, nonatomic, nullable) dispatch_queue_t barrierQueue;
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
@property (assign, nonatomic) UIBackgroundTaskIdentifier backgroundTaskId;
|
@property (assign, nonatomic) UIBackgroundTaskIdentifier backgroundTaskId;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ typedef NSMutableDictionary<NSString *, id> SDCallbacksDictionary;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
Class UIApplicationClass = NSClassFromString(@"UIApplication");
|
Class UIApplicationClass = NSClassFromString(@"UIApplication");
|
||||||
BOOL hasApplication = UIApplicationClass && [UIApplicationClass respondsToSelector:@selector(sharedApplication)];
|
BOOL hasApplication = UIApplicationClass && [UIApplicationClass respondsToSelector:@selector(sharedApplication)];
|
||||||
if (hasApplication && [self shouldContinueWhenAppEntersBackground]) {
|
if (hasApplication && [self shouldContinueWhenAppEntersBackground]) {
|
||||||
|
@ -179,7 +179,7 @@ typedef NSMutableDictionary<NSString *, id> SDCallbacksDictionary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
Class UIApplicationClass = NSClassFromString(@"UIApplication");
|
Class UIApplicationClass = NSClassFromString(@"UIApplication");
|
||||||
if(!UIApplicationClass || ![UIApplicationClass respondsToSelector:@selector(sharedApplication)]) {
|
if(!UIApplicationClass || ![UIApplicationClass respondsToSelector:@selector(sharedApplication)]) {
|
||||||
return;
|
return;
|
||||||
|
@ -345,7 +345,7 @@ didReceiveResponse:(NSURLResponse *)response
|
||||||
// Create the image
|
// Create the image
|
||||||
CGImageRef partialImageRef = CGImageSourceCreateImageAtIndex(imageSource, 0, NULL);
|
CGImageRef partialImageRef = CGImageSourceCreateImageAtIndex(imageSource, 0, NULL);
|
||||||
|
|
||||||
#ifdef TARGET_OS_IPHONE
|
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
|
||||||
// Workaround for iOS anamorphic image
|
// Workaround for iOS anamorphic image
|
||||||
if (partialImageRef) {
|
if (partialImageRef) {
|
||||||
const size_t partialHeight = CGImageGetHeight(partialImageRef);
|
const size_t partialHeight = CGImageGetHeight(partialImageRef);
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#import "SDWebImageCompat.h"
|
#import "SDWebImageCompat.h"
|
||||||
#import "SDWebImageManager.h"
|
#import "SDWebImageManager.h"
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Integrates SDWebImage async downloading and caching of remote images with UIButtonView.
|
* Integrates SDWebImage async downloading and caching of remote images with UIButtonView.
|
||||||
*/
|
*/
|
||||||
|
@ -230,3 +232,5 @@
|
||||||
- (void)sd_cancelBackgroundImageLoadForState:(UIControlState)state;
|
- (void)sd_cancelBackgroundImageLoadForState:(UIControlState)state;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
#import "objc/runtime.h"
|
#import "objc/runtime.h"
|
||||||
#import "UIView+WebCacheOperation.h"
|
#import "UIView+WebCacheOperation.h"
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
|
|
||||||
static char imageURLStorageKey;
|
static char imageURLStorageKey;
|
||||||
|
|
||||||
typedef NSMutableDictionary<NSNumber *, NSURL *> SDStateImageURLDictionary;
|
typedef NSMutableDictionary<NSNumber *, NSURL *> SDStateImageURLDictionary;
|
||||||
|
@ -183,3 +185,5 @@ typedef NSMutableDictionary<NSNumber *, NSURL *> SDStateImageURLDictionary;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
#if TARGET_OS_WATCH
|
||||||
|
#import <WatchKit/WatchKit.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
@interface UIImage (GIF)
|
@interface UIImage (GIF)
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,16 @@
|
||||||
} else {
|
} else {
|
||||||
// we will only retrieve the 1st frame. the full GIF support is available via the FLAnimatedImageView category.
|
// we will only retrieve the 1st frame. the full GIF support is available via the FLAnimatedImageView category.
|
||||||
// this here is only code to allow drawing animated images as static ones
|
// this here is only code to allow drawing animated images as static ones
|
||||||
|
CGFloat scale = 1;
|
||||||
|
#if TARGET_OS_WATCH
|
||||||
|
scale = [WKInterfaceDevice currentDevice].screenScale;
|
||||||
|
#else
|
||||||
|
scale = [UIScreen mainScreen].scale;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
CGImageRef CGImage = CGImageSourceCreateImageAtIndex(source, 0, NULL);
|
CGImageRef CGImage = CGImageSourceCreateImageAtIndex(source, 0, NULL);
|
||||||
UIImage *frameImage = [UIImage imageWithCGImage:CGImage scale:[UIScreen mainScreen].scale orientation:UIImageOrientationUp];
|
UIImage *frameImage = [UIImage imageWithCGImage:CGImage scale:scale orientation:UIImageOrientationUp];
|
||||||
staticImage = [UIImage animatedImageWithImages:@[frameImage] duration:0.0f];
|
staticImage = [UIImage animatedImageWithImages:@[frameImage] duration:0.0f];
|
||||||
CGImageRelease(CGImage);
|
CGImageRelease(CGImage);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
#import "SDWebImageCompat.h"
|
#import "SDWebImageCompat.h"
|
||||||
#import "SDWebImageManager.h"
|
#import "SDWebImageManager.h"
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Integrates SDWebImage async downloading and caching of remote images with UIImageView for highlighted state.
|
* Integrates SDWebImage async downloading and caching of remote images with UIImageView for highlighted state.
|
||||||
*/
|
*/
|
||||||
|
@ -92,3 +94,5 @@
|
||||||
- (void)sd_cancelCurrentHighlightedImageLoad;
|
- (void)sd_cancelCurrentHighlightedImageLoad;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#import "UIImageView+HighlightedWebCache.h"
|
#import "UIImageView+HighlightedWebCache.h"
|
||||||
#import "UIView+WebCacheOperation.h"
|
#import "UIView+WebCacheOperation.h"
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
|
|
||||||
#define UIImageViewHighlightedWebCacheOperationKey @"highlightedImage"
|
#define UIImageViewHighlightedWebCacheOperationKey @"highlightedImage"
|
||||||
|
|
||||||
@implementation UIImageView (HighlightedWebCache)
|
@implementation UIImageView (HighlightedWebCache)
|
||||||
|
@ -71,3 +73,5 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#import "SDWebImageCompat.h"
|
#import "SDWebImageCompat.h"
|
||||||
#import "SDWebImageManager.h"
|
#import "SDWebImageManager.h"
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Integrates SDWebImage async downloading and caching of remote images with UIImageView.
|
* Integrates SDWebImage async downloading and caching of remote images with UIImageView.
|
||||||
*
|
*
|
||||||
|
@ -211,3 +213,5 @@
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
#import "objc/runtime.h"
|
#import "objc/runtime.h"
|
||||||
#import "UIView+WebCacheOperation.h"
|
#import "UIView+WebCacheOperation.h"
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
|
|
||||||
static char imageURLKey;
|
static char imageURLKey;
|
||||||
static char TAG_ACTIVITY_INDICATOR;
|
static char TAG_ACTIVITY_INDICATOR;
|
||||||
static char TAG_ACTIVITY_STYLE;
|
static char TAG_ACTIVITY_STYLE;
|
||||||
|
@ -218,3 +220,5 @@ static char TAG_ACTIVITY_SHOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#import "SDWebImageManager.h"
|
#import "SDWebImageManager.h"
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
|
|
||||||
@interface UIView (WebCacheOperation)
|
@interface UIView (WebCacheOperation)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,3 +36,5 @@
|
||||||
- (void)sd_removeImageLoadOperationWithKey:(nullable NSString *)key;
|
- (void)sd_removeImageLoadOperationWithKey:(nullable NSString *)key;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#import "UIView+WebCacheOperation.h"
|
#import "UIView+WebCacheOperation.h"
|
||||||
#import "objc/runtime.h"
|
#import "objc/runtime.h"
|
||||||
|
|
||||||
|
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||||
|
|
||||||
static char loadOperationKey;
|
static char loadOperationKey;
|
||||||
|
|
||||||
typedef NSMutableDictionary<NSString *, id> SDOperationsDictionary;
|
typedef NSMutableDictionary<NSString *, id> SDOperationsDictionary;
|
||||||
|
@ -59,3 +61,5 @@ typedef NSMutableDictionary<NSString *, id> SDOperationsDictionary;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue