Commit 6e648f03 authored by 乔金柱's avatar 乔金柱

Merge branch 'lz/master' into 'master'

Lz/master

See merge request !2
parents 01159b28 d6fa1846
......@@ -248,6 +248,9 @@
LastUpgradeCheck = 0720;
ORGANIZATIONNAME = Q14;
TargetAttributes = {
6003F589195388D20070C39A = {
DevelopmentTeam = 86R4V3XFLU;
};
6003F5AD195388D20070C39A = {
TestTargetID = 6003F589195388D20070C39A;
};
......@@ -373,6 +376,7 @@
"${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework",
"${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework",
"${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
"${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework",
"${BUILT_PRODUCTS_DIR}/TMCache/TMCache.framework",
);
name = "[CP] Embed Pods Frameworks";
......@@ -385,6 +389,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TMCache.framework",
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -488,6 +493,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "armv7 armv7s arm64e arm64";
};
name = Debug;
};
......@@ -521,6 +527,7 @@
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VALID_ARCHS = "armv7 armv7s arm64e arm64";
};
name = Release;
};
......@@ -529,13 +536,16 @@
baseConfigurationReference = B0EC0126CB08246293DA5519 /* Pods-GMShareSDK_Example.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 86R4V3XFLU;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "GMShareSDK/GMShareSDK-Prefix.pch";
INFOPLIST_FILE = "GMShareSDK/GMShareSDK-Info.plist";
MODULE_NAME = ExampleApp;
PODS_ROOT = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
VALID_ARCHS = "armv7s armv7 arm64e arm64";
WRAPPER_EXTENSION = app;
};
name = Debug;
......@@ -545,13 +555,16 @@
baseConfigurationReference = 174E39EBC691D1A6D6E7E128 /* Pods-GMShareSDK_Example.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 86R4V3XFLU;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "GMShareSDK/GMShareSDK-Prefix.pch";
INFOPLIST_FILE = "GMShareSDK/GMShareSDK-Info.plist";
MODULE_NAME = ExampleApp;
PODS_ROOT = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
VALID_ARCHS = "armv7s armv7 arm64e arm64";
WRAPPER_EXTENSION = app;
};
name = Release;
......
......@@ -4,60 +4,68 @@ PODS:
- BDOpenSDKKit (~> 1.0.0)
- GMCache (1.0.1):
- TMCache (= 2.1.0)
- GMFoundation (1.0.3)
- GMFoundation (1.0.5)
- GMJSONModel (1.7.4)
- GMKit (1.1.6):
- GMKit/Category (= 1.1.6)
- GMKit/Color (= 1.1.6)
- GMKit/Constant (= 1.1.6)
- GMKit/FDFullscreenPopGesture (= 1.1.6)
- GMKit/Kit (= 1.1.6)
- GMKit/Protocol (= 1.1.6)
- GMKit (1.2.2):
- GMKit/Category (= 1.2.2)
- GMKit/Color (= 1.2.2)
- GMKit/Constant (= 1.2.2)
- GMKit/FDFullscreenPopGesture (= 1.2.2)
- GMKit/Kit (= 1.2.2)
- GMKit/Protocol (= 1.2.2)
- Masonry
- SDWebImage
- GMKit/Category (1.1.6):
- GMKit/Color (= 1.1.6)
- GMKit/Constant (= 1.1.6)
- GMKit/Protocol (= 1.1.6)
- SnapKit
- GMKit/Category (1.2.2):
- GMKit/Color (= 1.2.2)
- GMKit/Constant (= 1.2.2)
- GMKit/Protocol (= 1.2.2)
- Masonry
- SDWebImage
- GMKit/Color (1.1.6):
- SnapKit
- GMKit/Color (1.2.2):
- Masonry
- SDWebImage
- GMKit/Constant (1.1.6):
- SnapKit
- GMKit/Constant (1.2.2):
- Masonry
- SDWebImage
- GMKit/FDFullscreenPopGesture (1.1.6):
- SnapKit
- GMKit/FDFullscreenPopGesture (1.2.2):
- Masonry
- SDWebImage
- GMKit/Kit (1.1.6):
- GMKit/Category (= 1.1.6)
- GMKit/Color (= 1.1.6)
- GMKit/Constant (= 1.1.6)
- GMKit/Protocol (= 1.1.6)
- SnapKit
- GMKit/Kit (1.2.2):
- GMKit/Category (= 1.2.2)
- GMKit/Color (= 1.2.2)
- GMKit/Constant (= 1.2.2)
- GMKit/Protocol (= 1.2.2)
- Masonry
- SDWebImage
- GMKit/Protocol (1.1.6):
- SnapKit
- GMKit/Protocol (1.2.2):
- Masonry
- SDWebImage
- SnapKit
- GMPhobos (1.3.5):
- GMCache
- GMKit
- GMShareSDK (0.1.7):
- GMShareSDK (0.1.9):
- DouyinOpenSDK
- GMFoundation
- GMJSONModel
- GMKit
- GMPhobos
- Masonry
- MBProgressHUD
- MBProgressHUD (= 0.9.2)
- WechatOpenSDK
- WeiboSDK
- Masonry (1.1.0)
- MBProgressHUD (0.9.2)
- SDWebImage (5.4.0):
- SDWebImage/Core (= 5.4.0)
- SDWebImage/Core (5.4.0)
- SDWebImage (5.5.2):
- SDWebImage/Core (= 5.5.2)
- SDWebImage/Core (5.5.2)
- SnapKit (4.2.0)
- TMCache (2.1.0)
- WechatOpenSDK (1.8.6)
- WeiboSDK (3.1.3)
......@@ -79,6 +87,7 @@ SPEC REPOS:
- Masonry
- MBProgressHUD
- SDWebImage
- SnapKit
- TMCache
- WechatOpenSDK
- WeiboSDK
......@@ -91,14 +100,15 @@ SPEC CHECKSUMS:
BDOpenSDKKit: 3fb530ce73f85a7d6ee69e7fd3d9158444c5bd09
DouyinOpenSDK: 5ba83de22963ba7a3ba70c8ff11dfcb2885ecc2b
GMCache: b78d8e46db864405e91d226ce640cc80d966c611
GMFoundation: 2bdf7cddf02e5251503274c9158ac1c851f2b8da
GMFoundation: 3b621bde6b0661ae61393b55691974f570f46208
GMJSONModel: 5e81a98de668e9f93cf6ff77869f77b0d1a806be
GMKit: 2573350637f4d4e200c8cf3426b7b96a924af15e
GMKit: 09fe863069d9750c89fae2939770b08fc74b9027
GMPhobos: 1e2d68c456b69bf156276d7242877498107474db
GMShareSDK: 0eb73091491849a0f0bcf8c976ddef860fb44c0e
GMShareSDK: 16b9de277b1d14e017a7e344b17d04cdb0f0d037
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
SDWebImage: 5bf6aec6481ae2a062bdc59f9d6c1d1e552090e0
SDWebImage: 4d5c027c935438f341ed33dbac53ff9f479922ca
SnapKit: fe8a619752f3f27075cc9a90244d75c6c3f27e2a
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
WechatOpenSDK: 368ae03b72ee3ea1328c4f11326fbb5d2721d118
WeiboSDK: acb067053668102cf07d01aa7604350162c2e466
......
......@@ -17,7 +17,7 @@
// UIApplication.shared.keyWindow?.rootViewController?.present(alert, animated: true, completion: nil)
// }
- (void)showgm_OKAlertWithTitle:(NSString *)title message:(NSString *)message actionTitle:(NSString *)actionTitle actionHandler:(void(^)(void))actionHandler {
+ (void)showgm_OKAlertWithTitle:(NSString *)title message:(NSString *)message actionTitle:(NSString *)actionTitle actionHandler:(void(^)(void))actionHandler {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
// __weak typeof(self)weakSelf = self;
UIAlertAction *action = [UIAlertAction actionWithTitle:actionTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
......@@ -29,7 +29,7 @@
[UIApplication.sharedApplication.keyWindow.rootViewController presentViewController:alert animated:YES completion:NULL];
}
- (void)gm_Alert:(NSString *)title leftTitle:(NSString *)leftTitle rightTitle:(NSString *)rightTitle leftAlterAction:(void(^)(void))leftAlterAction rightAlertAction:(void(^)(void))rightAlertAction {
+ (void)gm_Alert:(NSString *)title leftTitle:(NSString *)leftTitle rightTitle:(NSString *)rightTitle leftAlterAction:(void(^)(void))leftAlterAction rightAlertAction:(void(^)(void))rightAlertAction {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:@"" preferredStyle:UIAlertControllerStyleAlert];
// __weak typeof(self)weakSelf = self;
UIAlertAction *leftAction = [UIAlertAction actionWithTitle:leftTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
......
......@@ -82,7 +82,7 @@
indicator.centerX = button.centerX;
indicator.layer.cornerRadius = 1 + ONE_PIXEL;
indicator.layer.masksToBounds = YES;
indicator.layer.shadowColor = UIColor.auxiliaryTextGreen.CGColor;
indicator.layer.shadowColor = weakSelf.indicatorColor.CGColor;
indicator.layer.shadowOpacity = 0.35;
indicator.layer.shadowOffset = CGSizeMake(0,1);
indicator.layer.shadowRadius = 1;
......
{
"name": "GMShareSDK",
"version": "0.1.7",
"version": "0.1.9",
"summary": "A short description of GMShareSDK.",
"description": "TODO: Add long description of the pod here.",
"homepage": "http://git.wanmeizhensuo.com/gengmeiios/GMShareSDK.git",
......@@ -13,7 +13,7 @@
},
"source": {
"git": "git@git.wanmeizhensuo.com:gengmeiios/GMShareSDK.git",
"tag": "0.1.7"
"tag": "0.1.9"
},
"platforms": {
"ios": "8.0"
......@@ -34,7 +34,7 @@
],
"MBProgressHUD": [
"0.9.2"
],
"GMJSONModel": [
......
......@@ -4,60 +4,68 @@ PODS:
- BDOpenSDKKit (~> 1.0.0)
- GMCache (1.0.1):
- TMCache (= 2.1.0)
- GMFoundation (1.0.3)
- GMFoundation (1.0.5)
- GMJSONModel (1.7.4)
- GMKit (1.1.6):
- GMKit/Category (= 1.1.6)
- GMKit/Color (= 1.1.6)
- GMKit/Constant (= 1.1.6)
- GMKit/FDFullscreenPopGesture (= 1.1.6)
- GMKit/Kit (= 1.1.6)
- GMKit/Protocol (= 1.1.6)
- GMKit (1.2.2):
- GMKit/Category (= 1.2.2)
- GMKit/Color (= 1.2.2)
- GMKit/Constant (= 1.2.2)
- GMKit/FDFullscreenPopGesture (= 1.2.2)
- GMKit/Kit (= 1.2.2)
- GMKit/Protocol (= 1.2.2)
- Masonry
- SDWebImage
- GMKit/Category (1.1.6):
- GMKit/Color (= 1.1.6)
- GMKit/Constant (= 1.1.6)
- GMKit/Protocol (= 1.1.6)
- SnapKit
- GMKit/Category (1.2.2):
- GMKit/Color (= 1.2.2)
- GMKit/Constant (= 1.2.2)
- GMKit/Protocol (= 1.2.2)
- Masonry
- SDWebImage
- GMKit/Color (1.1.6):
- SnapKit
- GMKit/Color (1.2.2):
- Masonry
- SDWebImage
- GMKit/Constant (1.1.6):
- SnapKit
- GMKit/Constant (1.2.2):
- Masonry
- SDWebImage
- GMKit/FDFullscreenPopGesture (1.1.6):
- SnapKit
- GMKit/FDFullscreenPopGesture (1.2.2):
- Masonry
- SDWebImage
- GMKit/Kit (1.1.6):
- GMKit/Category (= 1.1.6)
- GMKit/Color (= 1.1.6)
- GMKit/Constant (= 1.1.6)
- GMKit/Protocol (= 1.1.6)
- SnapKit
- GMKit/Kit (1.2.2):
- GMKit/Category (= 1.2.2)
- GMKit/Color (= 1.2.2)
- GMKit/Constant (= 1.2.2)
- GMKit/Protocol (= 1.2.2)
- Masonry
- SDWebImage
- GMKit/Protocol (1.1.6):
- SnapKit
- GMKit/Protocol (1.2.2):
- Masonry
- SDWebImage
- SnapKit
- GMPhobos (1.3.5):
- GMCache
- GMKit
- GMShareSDK (0.1.7):
- GMShareSDK (0.1.9):
- DouyinOpenSDK
- GMFoundation
- GMJSONModel
- GMKit
- GMPhobos
- Masonry
- MBProgressHUD
- MBProgressHUD (= 0.9.2)
- WechatOpenSDK
- WeiboSDK
- Masonry (1.1.0)
- MBProgressHUD (0.9.2)
- SDWebImage (5.4.0):
- SDWebImage/Core (= 5.4.0)
- SDWebImage/Core (5.4.0)
- SDWebImage (5.5.2):
- SDWebImage/Core (= 5.5.2)
- SDWebImage/Core (5.5.2)
- SnapKit (4.2.0)
- TMCache (2.1.0)
- WechatOpenSDK (1.8.6)
- WeiboSDK (3.1.3)
......@@ -79,6 +87,7 @@ SPEC REPOS:
- Masonry
- MBProgressHUD
- SDWebImage
- SnapKit
- TMCache
- WechatOpenSDK
- WeiboSDK
......@@ -91,14 +100,15 @@ SPEC CHECKSUMS:
BDOpenSDKKit: 3fb530ce73f85a7d6ee69e7fd3d9158444c5bd09
DouyinOpenSDK: 5ba83de22963ba7a3ba70c8ff11dfcb2885ecc2b
GMCache: b78d8e46db864405e91d226ce640cc80d966c611
GMFoundation: 2bdf7cddf02e5251503274c9158ac1c851f2b8da
GMFoundation: 3b621bde6b0661ae61393b55691974f570f46208
GMJSONModel: 5e81a98de668e9f93cf6ff77869f77b0d1a806be
GMKit: 2573350637f4d4e200c8cf3426b7b96a924af15e
GMKit: 09fe863069d9750c89fae2939770b08fc74b9027
GMPhobos: 1e2d68c456b69bf156276d7242877498107474db
GMShareSDK: 0eb73091491849a0f0bcf8c976ddef860fb44c0e
GMShareSDK: 16b9de277b1d14e017a7e344b17d04cdb0f0d037
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
SDWebImage: 5bf6aec6481ae2a062bdc59f9d6c1d1e552090e0
SDWebImage: 4d5c027c935438f341ed33dbac53ff9f479922ca
SnapKit: fe8a619752f3f27075cc9a90244d75c6c3f27e2a
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
WechatOpenSDK: 368ae03b72ee3ea1328c4f11326fbb5d2721d118
WeiboSDK: acb067053668102cf07d01aa7604350162c2e466
......
This diff is collapsed.
......@@ -19,8 +19,9 @@ This library provides an async image downloader with cache support. For convenie
- [x] Categories for `UIImageView`, `UIButton`, `MKAnnotationView` adding web image and cache management
- [x] An asynchronous image downloader
- [x] An asynchronous memory + disk image caching with automatic cache expiration handling
- [x] A background image decompression
- [x] Progressive image loading (including animated image, like GIF showing in Web browser)
- [x] A background image decompression to avoid frame rate drop
- [x] [Progressive image loading](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#progressive-animation) (including animated image, like GIF showing in Web browser)
- [x] [Thumbnail image decoding](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#thumbnail-decoding-550) to save CPU && Memory for large images
- [x] [Extendable image coder](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#custom-coder-420) to support massive image format, like WebP
- [x] [Full-stack solution for animated images](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#animated-image-50) which keep a balance between CPU && Memory
- [x] [Customizable and composable transformations](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#transformer-50) can be applied to the images right after download
......@@ -56,10 +57,13 @@ We support SwiftUI by building with the functions (caching, loading and animatio
- [SDWebImageBPGCoder](https://github.com/SDWebImage/SDWebImageBPGCoder) - coder for BPG format
- [SDWebImageFLIFCoder](https://github.com/SDWebImage/SDWebImageFLIFCoder) - coder for FLIF format
- [SDWebImageAVIFCoder](https://github.com/SDWebImage/SDWebImageAVIFCoder) - coder for AVIF (AV1-based) format
- [SDWebImagePDFCoder](https://github.com/SDWebImage/SDWebImagePDFCoder) - coder for PDF vector format image
- [SDWebImageSVGCoder](https://github.com/SDWebImage/SDWebImageSVGCoder) - coder for SVG vector format image
- and more from community!
#### Loaders
- [SDWebImagePhotosPlugin](https://github.com/SDWebImage/SDWebImagePhotosPlugin) - plugin to support loading images from Photos (using `Photos.framework`)
- [SDWebImageLinkPlugin](https://github.com/SDWebImage/SDWebImageLinkPlugin) - plugin to support loading images from rich link url, as well as `LPLinkView` (using `LinkPresentation.framework`)
#### Integration with 3rd party libraries
- [SDWebImageFLPlugin](https://github.com/SDWebImage/SDWebImageFLPlugin) - plugin to support [FLAnimatedImage](https://github.com/Flipboard/FLAnimatedImage) as the engine for animated GIFs
......
......@@ -19,6 +19,10 @@
The underlying Core Graphics image object. This will actually use `CGImageForProposedRect` with the image size.
*/
@property (nonatomic, readonly, nullable) CGImageRef CGImage;
/**
The underlying Core Image data. This will actually use `bestRepresentationForRect` with the image size to find the `NSCIImageRep`.
*/
@property (nonatomic, readonly, nullable) CIImage *CIImage;
/**
The scale factor of the image. This wil actually use `bestRepresentationForRect` with image size and pixel size to calculate the scale factor. If failed, use the default value 1.0. Should be greater than or equal to 1.0.
*/
......@@ -38,6 +42,16 @@ The underlying Core Graphics image object. This will actually use `CGImageForPro
*/
- (nonnull instancetype)initWithCGImage:(nonnull CGImageRef)cgImage scale:(CGFloat)scale orientation:(CGImagePropertyOrientation)orientation;
/**
Initializes and returns an image object with the specified Core Image object. The representation is `NSCIImageRep`.
@param ciImage A Core Image image object
@param scale The image scale factor
@param orientation The orientation of the image data
@return The image object
*/
- (nonnull instancetype)initWithCIImage:(nonnull CIImage *)ciImage scale:(CGFloat)scale orientation:(CGImagePropertyOrientation)orientation;
/**
Returns an image object with the scale factor. The representation is created from the image data.
@note The difference between these this and `initWithData:` is that `initWithData:` will always use `backingScaleFactor` as scale factor.
......
......@@ -20,6 +20,15 @@
return cgImage;
}
- (nullable CIImage *)CIImage {
NSRect imageRect = NSMakeRect(0, 0, self.size.width, self.size.height);
NSImageRep *imageRep = [self bestRepresentationForRect:imageRect context:nil hints:nil];
if (![imageRep isKindOfClass:NSCIImageRep.class]) {
return nil;
}
return ((NSCIImageRep *)imageRep).CIImage;
}
- (CGFloat)scale {
CGFloat scale = 1;
NSRect imageRect = NSMakeRect(0, 0, self.size.width, self.size.height);
......@@ -65,6 +74,28 @@
return self;
}
- (instancetype)initWithCIImage:(nonnull CIImage *)ciImage scale:(CGFloat)scale orientation:(CGImagePropertyOrientation)orientation {
NSCIImageRep *imageRep;
if (orientation != kCGImagePropertyOrientationUp) {
CIImage *rotatedCIImage = [ciImage imageByApplyingOrientation:orientation];
imageRep = [[NSCIImageRep alloc] initWithCIImage:rotatedCIImage];
} else {
imageRep = [[NSCIImageRep alloc] initWithCIImage:ciImage];
}
if (scale < 1) {
scale = 1;
}
CGFloat pixelWidth = imageRep.pixelsWide;
CGFloat pixelHeight = imageRep.pixelsHigh;
NSSize size = NSMakeSize(pixelWidth / scale, pixelHeight / scale);
self = [self initWithSize:size];
if (self) {
imageRep.size = size;
[self addRepresentation:imageRep];
}
return self;
}
- (instancetype)initWithData:(nonnull NSData *)data scale:(CGFloat)scale {
NSBitmapImageRep *imageRep = [[NSBitmapImageRep alloc] initWithData:data];
if (!imageRep) {
......
......@@ -72,6 +72,7 @@
// This class override these methods from UIImage(NSImage), and it supports NSSecureCoding.
// You should use these methods to create a new animated image. Use other methods just call super instead.
// Pay attention, when the animated image frame count <= 1, all the `SDAnimatedImageProvider` protocol methods will return nil or 0 value, you'd better check the frame count before usage and keep fallback.
+ (nullable instancetype)imageNamed:(nonnull NSString *)name; // Cache in memory, no Asset Catalog support
#if __has_include(<UIKit/UITraitCollection.h>)
+ (nullable instancetype)imageNamed:(nonnull NSString *)name inBundle:(nullable NSBundle *)bundle compatibleWithTraitCollection:(nullable UITraitCollection *)traitCollection; // Cache in memory, no Asset Catalog support
......
......@@ -156,7 +156,10 @@ static CGFloat SDImageScaleFromPath(NSString *string) {
self = [super initWithCGImage:image.CGImage scale:MAX(scale, 1) orientation:image.imageOrientation];
#endif
if (self) {
_animatedCoder = animatedCoder;
// Only keep the animated coder if frame count > 1, save RAM usage for non-animated image format (APNG/WebP)
if (animatedCoder.animatedImageFrameCount > 1) {
_animatedCoder = animatedCoder;
}
NSData *data = [animatedCoder animatedImageData];
SDImageFormat format = [NSData sd_imageFormatForImageData:data];
_animatedImageFormat = format;
......@@ -166,6 +169,9 @@ static CGFloat SDImageScaleFromPath(NSString *string) {
#pragma mark - Preload
- (void)preloadAllFrames {
if (!_animatedCoder) {
return;
}
if (!self.isAllFramesLoaded) {
NSMutableArray<SDImageFrame *> *frames = [NSMutableArray arrayWithCapacity:self.animatedImageFrameCount];
for (size_t i = 0; i < self.animatedImageFrameCount; i++) {
......@@ -180,6 +186,9 @@ static CGFloat SDImageScaleFromPath(NSString *string) {
}
- (void)unloadAllFrames {
if (!_animatedCoder) {
return;
}
if (self.isAllFramesLoaded) {
self.loadedAnimatedImageFrames = nil;
self.allFramesLoaded = NO;
......@@ -190,11 +199,12 @@ static CGFloat SDImageScaleFromPath(NSString *string) {
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
if (self) {
_animatedImageFormat = [aDecoder decodeIntegerForKey:NSStringFromSelector(@selector(animatedImageFormat))];
NSData *animatedImageData = [aDecoder decodeObjectOfClass:[NSData class] forKey:NSStringFromSelector(@selector(animatedImageData))];
CGFloat scale = self.scale;
if (!animatedImageData) {
return self;
}
CGFloat scale = self.scale;
id<SDAnimatedImageCoder> animatedCoder = nil;
for (id<SDImageCoder>coder in [SDImageCodersManager sharedManager].coders) {
if ([coder conformsToProtocol:@protocol(SDAnimatedImageCoder)]) {
......@@ -207,15 +217,16 @@ static CGFloat SDImageScaleFromPath(NSString *string) {
if (!animatedCoder) {
return self;
}
_animatedCoder = animatedCoder;
SDImageFormat format = [NSData sd_imageFormatForImageData:animatedImageData];
_animatedImageFormat = format;
if (animatedCoder.animatedImageFrameCount > 1) {
_animatedCoder = animatedCoder;
}
}
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder {
[super encodeWithCoder:aCoder];
[aCoder encodeInteger:self.animatedImageFormat forKey:NSStringFromSelector(@selector(animatedImageFormat))];
NSData *animatedImageData = self.animatedImageData;
if (animatedImageData) {
[aCoder encodeObject:animatedImageData forKey:NSStringFromSelector(@selector(animatedImageData))];
......@@ -226,7 +237,7 @@ static CGFloat SDImageScaleFromPath(NSString *string) {
return YES;
}
#pragma mark - SDAnimatedImage
#pragma mark - SDAnimatedImageProvider
- (NSData *)animatedImageData {
return [self.animatedCoder animatedImageData];
......
......@@ -19,6 +19,7 @@
@interface SDAnimatedImageView () <CALayerDelegate> {
BOOL _initFinished; // Extra flag to mark the `commonInit` is called
NSRunLoopMode _runLoopMode;
NSUInteger _maxBufferSize;
double _playbackRate;
}
......@@ -153,6 +154,9 @@
// RunLoop Mode
self.player.runLoopMode = self.runLoopMode;
// Max Buffer Size
self.player.maxBufferSize = self.maxBufferSize;
// Play Rate
self.player.playbackRate = self.playbackRate;
......@@ -166,12 +170,13 @@
};
self.player.animationLoopHandler = ^(NSUInteger loopCount) {
@strongify(self);
self.currentLoopCount = loopCount;
// Progressive image reach the current last frame index. Keep the state and pause animating. Wait for later restart
if (self.isProgressive) {
NSUInteger lastFrameIndex = self.player.totalFrameCount;
NSUInteger lastFrameIndex = self.player.totalFrameCount - 1;
[self.player seekToFrameAtIndex:lastFrameIndex loopCount:0];
[self.player pausePlaying];
} else {
self.currentLoopCount = loopCount;
}
};
......@@ -206,6 +211,16 @@
return [NSProcessInfo processInfo].activeProcessorCount > 1 ? NSRunLoopCommonModes : NSDefaultRunLoopMode;
}
- (void)setMaxBufferSize:(NSUInteger)maxBufferSize
{
_maxBufferSize = maxBufferSize;
self.player.maxBufferSize = maxBufferSize;
}
- (NSUInteger)maxBufferSize {
return _maxBufferSize; // Defaults to 0
}
- (void)setPlaybackRate:(double)playbackRate
{
_playbackRate = playbackRate;
......
......@@ -146,11 +146,15 @@ static NSString * const SDDiskCacheExtendedAttributeName = @"com.hackemist.SDDis
case SDImageCacheConfigExpireTypeAccessDate:
cacheContentDateKey = NSURLContentAccessDateKey;
break;
case SDImageCacheConfigExpireTypeModificationDate:
cacheContentDateKey = NSURLContentModificationDateKey;
break;
case SDImageCacheConfigExpireTypeCreationDate:
cacheContentDateKey = NSURLCreationDateKey;
break;
case SDImageCacheConfigExpireTypeChangeDate:
cacheContentDateKey = NSURLAttributeModificationDateKey;
break;
default:
break;
}
......
......@@ -12,13 +12,21 @@
/// Image Cache Expire Type
typedef NS_ENUM(NSUInteger, SDImageCacheConfigExpireType) {
/**
* When the image is accessed it will update this value
* When the image cache is accessed it will update this value
*/
SDImageCacheConfigExpireTypeAccessDate,
/**
* The image was obtained from the disk cache (Default)
* When the image cache is created or modified it will update this value (Default)
*/
SDImageCacheConfigExpireTypeModificationDate
SDImageCacheConfigExpireTypeModificationDate,
/**
* When the image cache is created it will update this value
*/
SDImageCacheConfigExpireTypeCreationDate,
/**
* When the image cache is created, modified, renamed, file attribute updated (like permission, xattr) it will update this value
*/
SDImageCacheConfigExpireTypeChangeDate,
};
/**
......
......@@ -18,12 +18,25 @@ UIImage * _Nullable SDImageCacheDecodeImageData(NSData * _Nonnull imageData, NSS
BOOL decodeFirstFrame = SD_OPTIONS_CONTAINS(options, SDWebImageDecodeFirstFrameOnly);
NSNumber *scaleValue = context[SDWebImageContextImageScaleFactor];
CGFloat scale = scaleValue.doubleValue >= 1 ? scaleValue.doubleValue : SDImageScaleFactorForKey(cacheKey);
SDImageCoderOptions *coderOptions = @{SDImageCoderDecodeFirstFrameOnly : @(decodeFirstFrame), SDImageCoderDecodeScaleFactor : @(scale)};
if (context) {
SDImageCoderMutableOptions *mutableCoderOptions = [coderOptions mutableCopy];
[mutableCoderOptions setValue:context forKey:SDImageCoderWebImageContext];
coderOptions = [mutableCoderOptions copy];
NSNumber *preserveAspectRatioValue = context[SDWebImageContextImagePreserveAspectRatio];
NSValue *thumbnailSizeValue;
BOOL shouldScaleDown = SD_OPTIONS_CONTAINS(options, SDWebImageScaleDownLargeImages);
if (shouldScaleDown) {
CGFloat thumbnailPixels = SDImageCoderHelper.defaultScaleDownLimitBytes / 4;
CGFloat dimension = ceil(sqrt(thumbnailPixels));
thumbnailSizeValue = @(CGSizeMake(dimension, dimension));
}
if (context[SDWebImageContextImageThumbnailPixelSize]) {
thumbnailSizeValue = context[SDWebImageContextImageThumbnailPixelSize];
}
SDImageCoderMutableOptions *mutableCoderOptions = [NSMutableDictionary dictionaryWithCapacity:2];
mutableCoderOptions[SDImageCoderDecodeFirstFrameOnly] = @(decodeFirstFrame);
mutableCoderOptions[SDImageCoderDecodeScaleFactor] = @(scale);
mutableCoderOptions[SDImageCoderDecodePreserveAspectRatio] = preserveAspectRatioValue;
mutableCoderOptions[SDImageCoderDecodeThumbnailPixelSize] = thumbnailSizeValue;
mutableCoderOptions[SDImageCoderWebImageContext] = context;
SDImageCoderOptions *coderOptions = [mutableCoderOptions copy];
if (!decodeFirstFrame) {
Class animatedImageClass = context[SDWebImageContextAnimatedImageClass];
......@@ -56,12 +69,7 @@ UIImage * _Nullable SDImageCacheDecodeImageData(NSData * _Nonnull imageData, NSS
shouldDecode = NO;
}
if (shouldDecode) {
BOOL shouldScaleDown = SD_OPTIONS_CONTAINS(options, SDWebImageScaleDownLargeImages);
if (shouldScaleDown) {
image = [SDImageCoderHelper decodedAndScaledDownImageWithImage:image limitBytes:0];
} else {
image = [SDImageCoderHelper decodedImageWithImage:image];
}
image = [SDImageCoderHelper decodedImageWithImage:image];
}
}
......
......@@ -27,6 +27,22 @@ FOUNDATION_EXPORT SDImageCoderOption _Nonnull const SDImageCoderDecodeFirstFrame
*/
FOUNDATION_EXPORT SDImageCoderOption _Nonnull const SDImageCoderDecodeScaleFactor;
/**
A Boolean value indicating whether to keep the original aspect ratio when generating thumbnail images (or bitmap images from vector format).
Defaults to YES.
@note works for `SDImageCoder`, `SDProgressiveImageCoder`, `SDAnimatedImageCoder`.
*/
FOUNDATION_EXPORT SDImageCoderOption _Nonnull const SDImageCoderDecodePreserveAspectRatio;
/**
A CGSize value indicating whether or not to generate the thumbnail images (or bitmap images from vector format). When this value is provided, the decoder will generate a thumbnail image which pixel size is smaller than or equal to (depends the `.preserveAspectRatio`) the value size.
Defaults to CGSizeZero, which means no thumbnail generation at all.
@note When you pass `.preserveAspectRatio == NO`, the thumbnail image is stretched to match each dimension. When `.preserveAspectRatio == YES`, the thumbnail image's width is limited to pixel size's width, the thumbnail image's height is limited to pixel size's height. For common cases, you can just pass a square size to limit both.
@note works for `SDImageCoder`, `SDProgressiveImageCoder`, `SDAnimatedImageCoder`.
*/
FOUNDATION_EXPORT SDImageCoderOption _Nonnull const SDImageCoderDecodeThumbnailPixelSize;
// These options are for image encoding
/**
A Boolean value indicating whether to encode the first frame only for animated image during encoding. (NSNumber). If not provide, encode animated image if need.
......
......@@ -10,6 +10,8 @@
SDImageCoderOption const SDImageCoderDecodeFirstFrameOnly = @"decodeFirstFrameOnly";
SDImageCoderOption const SDImageCoderDecodeScaleFactor = @"decodeScaleFactor";
SDImageCoderOption const SDImageCoderDecodePreserveAspectRatio = @"decodePreserveAspectRatio";
SDImageCoderOption const SDImageCoderDecodeThumbnailPixelSize = @"decodeThumbnailPixelSize";
SDImageCoderOption const SDImageCoderEncodeFirstFrameOnly = @"encodeFirstFrameOnly";
SDImageCoderOption const SDImageCoderEncodeCompressionQuality = @"encodeCompressionQuality";
......
......@@ -73,6 +73,16 @@
*/
+ (CGImageRef _Nullable)CGImageCreateDecoded:(_Nonnull CGImageRef)cgImage orientation:(CGImagePropertyOrientation)orientation CF_RETURNS_RETAINED;
/**
Create a scaled CGImage by the provided CGImage and size. This follows The Create Rule and you are response to call release after usage.
It will detect whether the image size matching the scale size, if not, stretch the image to the target size.
@param cgImage The CGImage
@param size The scale size in pixel.
@return A new created scaled image
*/
+ (CGImageRef _Nullable)CGImageCreateScaled:(_Nonnull CGImageRef)cgImage size:(CGSize)size CF_RETURNS_RETAINED;
/**
Return the decoded image by the provided image. This one unlike `CGImageCreateDecoded:`, will not decode the image which contains alpha channel or animated image
@param image The image to be decoded
......@@ -89,6 +99,12 @@
*/
+ (UIImage * _Nullable)decodedAndScaledDownImageWithImage:(UIImage * _Nullable)image limitBytes:(NSUInteger)bytes;
/**
Control the default limit bytes to scale down larget images.
This value must be larger than or equal to 1MB. Defaults to 60MB on iOS/tvOS, 90MB on macOS, 30MB on watchOS.
*/
@property (class, readwrite) NSUInteger defaultScaleDownLimitBytes;
#if SD_UIKIT || SD_WATCH
/**
Convert an EXIF image orientation to an iOS one.
......
......@@ -13,34 +13,34 @@
#import "SDAnimatedImageRep.h"
#import "UIImage+ForceDecode.h"
#import "SDAssociatedObject.h"
#import "UIImage+Metadata.h"
#import "SDInternalMacros.h"
#import <Accelerate/Accelerate.h>
static inline size_t SDByteAlign(size_t size, size_t alignment) {
return ((size + (alignment - 1)) / alignment) * alignment;
}
#if SD_UIKIT || SD_WATCH
static const size_t kBytesPerPixel = 4;
static const size_t kBitsPerComponent = 8;
static const CGFloat kBytesPerMB = 1024.0f * 1024.0f;
static const CGFloat kPixelsPerMB = kBytesPerMB / kBytesPerPixel;
/*
* Defines the maximum size in MB of the decoded image when the flag `SDWebImageScaleDownLargeImages` is set
* Suggested value for iPad1 and iPhone 3GS: 60.
* Suggested value for iPad2 and iPhone 4: 120.
* Suggested value for iPhone 3G and iPod 2 and earlier devices: 30.
*/
static const CGFloat kDestImageSizeMB = 60.f;
/*
* Defines the maximum size in MB of a tile used to decode image when the flag `SDWebImageScaleDownLargeImages` is set
* Suggested value for iPad1 and iPhone 3GS: 20.
* Suggested value for iPad2 and iPhone 4: 40.
* Suggested value for iPhone 3G and iPod 2 and earlier devices: 10.
*/
static const CGFloat kSourceImageTileSizeMB = 20.f;
static const CGFloat kBytesPerMB = 1024.0f * 1024.0f;
static const CGFloat kPixelsPerMB = kBytesPerMB / kBytesPerPixel;
static const CGFloat kDestTotalPixels = kDestImageSizeMB * kPixelsPerMB;
static const CGFloat kTileTotalPixels = kSourceImageTileSizeMB * kPixelsPerMB;
#if SD_MAC
static CGFloat kDestImageLimitBytes = 90.f * kBytesPerMB;
#elif SD_UIKIT
static CGFloat kDestImageLimitBytes = 60.f * kBytesPerMB;
#elif SD_WATCH
static CGFloat kDestImageLimitBytes = 30.f * kBytesPerMB;
#endif
static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to overlap the seems where tiles meet.
#endif
@implementation SDImageCoderHelper
......@@ -277,10 +277,57 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
return newImageRef;
}
+ (CGImageRef)CGImageCreateScaled:(CGImageRef)cgImage size:(CGSize)size {
if (!cgImage) {
return NULL;
}
size_t width = CGImageGetWidth(cgImage);
size_t height = CGImageGetHeight(cgImage);
if (width == size.width && height == size.height) {
CGImageRetain(cgImage);
return cgImage;
}
__block vImage_Buffer input_buffer = {}, output_buffer = {};
@onExit {
if (input_buffer.data) free(input_buffer.data);
if (output_buffer.data) free(output_buffer.data);
};
BOOL hasAlpha = [self CGImageContainsAlpha:cgImage];
// iOS display alpha info (BGRA8888/BGRX8888)
CGBitmapInfo bitmapInfo = kCGBitmapByteOrder32Host;
bitmapInfo |= hasAlpha ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaNoneSkipFirst;
vImage_CGImageFormat format = (vImage_CGImageFormat) {
.bitsPerComponent = 8,
.bitsPerPixel = 32,
.colorSpace = NULL,
.bitmapInfo = bitmapInfo,
.version = 0,
.decode = NULL,
.renderingIntent = kCGRenderingIntentDefault,
};
vImage_Error a_ret = vImageBuffer_InitWithCGImage(&input_buffer, &format, NULL, cgImage, kvImageNoFlags);
if (a_ret != kvImageNoError) return NULL;
output_buffer.width = MAX(size.width, 0);
output_buffer.height = MAX(size.height, 0);
output_buffer.rowBytes = SDByteAlign(output_buffer.width * 4, 64);
output_buffer.data = malloc(output_buffer.rowBytes * output_buffer.height);
if (!output_buffer.data) return NULL;
vImage_Error ret = vImageScale_ARGB8888(&input_buffer, &output_buffer, NULL, kvImageHighQualityResampling);
if (ret != kvImageNoError) return NULL;
CGImageRef outputImage = vImageCreateCGImageFromBuffer(&output_buffer, &format, NULL, NULL, kvImageNoFlags, &ret);
if (ret != kvImageNoError) {
CGImageRelease(outputImage);
return NULL;
}
return outputImage;
}
+ (UIImage *)decodedImageWithImage:(UIImage *)image {
#if SD_MAC
return image;
#else
if (![self shouldDecodeImage:image]) {
return image;
}
......@@ -289,18 +336,18 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
if (!imageRef) {
return image;
}
#if SD_MAC
UIImage *decodedImage = [[UIImage alloc] initWithCGImage:imageRef scale:image.scale orientation:kCGImagePropertyOrientationUp];
#else
UIImage *decodedImage = [[UIImage alloc] initWithCGImage:imageRef scale:image.scale orientation:image.imageOrientation];
#endif
CGImageRelease(imageRef);
SDImageCopyAssociatedObject(image, decodedImage);
decodedImage.sd_isDecoded = YES;
return decodedImage;
#endif
}
+ (UIImage *)decodedAndScaledDownImageWithImage:(UIImage *)image limitBytes:(NSUInteger)bytes {
#if SD_MAC
return image;
#else
if (![self shouldDecodeImage:image]) {
return image;
}
......@@ -311,13 +358,11 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
CGFloat destTotalPixels;
CGFloat tileTotalPixels;
if (bytes > 0) {
destTotalPixels = bytes / kBytesPerPixel;
tileTotalPixels = destTotalPixels / 3;
} else {
destTotalPixels = kDestTotalPixels;
tileTotalPixels = kTileTotalPixels;
if (bytes == 0) {
bytes = kDestImageLimitBytes;
}
destTotalPixels = bytes / kBytesPerPixel;
tileTotalPixels = destTotalPixels / 3;
CGContextRef destContext;
// autorelease the bitmap context and all vars to help system to free memory when there are memory warning.
......@@ -420,7 +465,11 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
if (destImageRef == NULL) {
return image;
}
#if SD_MAC
UIImage *destImage = [[UIImage alloc] initWithCGImage:destImageRef scale:image.scale orientation:kCGImagePropertyOrientationUp];
#else
UIImage *destImage = [[UIImage alloc] initWithCGImage:destImageRef scale:image.scale orientation:image.imageOrientation];
#endif
CGImageRelease(destImageRef);
if (destImage == nil) {
return image;
......@@ -429,7 +478,17 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
destImage.sd_isDecoded = YES;
return destImage;
}
#endif
}
+ (NSUInteger)defaultScaleDownLimitBytes {
return kDestImageLimitBytes;
}
+ (void)setDefaultScaleDownLimitBytes:(NSUInteger)defaultScaleDownLimitBytes {
if (defaultScaleDownLimitBytes < kBytesPerMB) {
return;
}
kDestImageLimitBytes = defaultScaleDownLimitBytes;
}
#if SD_UIKIT || SD_WATCH
......@@ -503,7 +562,6 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
#endif
#pragma mark - Helper Fuction
#if SD_UIKIT || SD_WATCH
+ (BOOL)shouldDecodeImage:(nullable UIImage *)image {
// Avoid extra decode
if (image.sd_isDecoded) {
......@@ -514,7 +572,7 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
return NO;
}
// do not decode animated images
if (image.images != nil) {
if (image.sd_isAnimated) {
return NO;
}
......@@ -533,11 +591,10 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
return NO;
}
CGFloat destTotalPixels;
if (bytes > 0) {
destTotalPixels = bytes / kBytesPerPixel;
} else {
destTotalPixels = kDestTotalPixels;
if (bytes == 0) {
bytes = kDestImageLimitBytes;
}
destTotalPixels = bytes / kBytesPerPixel;
if (destTotalPixels <= kPixelsPerMB) {
// Too small to scale down
return NO;
......@@ -551,7 +608,6 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
return shouldScaleDown;
}
#endif
static inline CGAffineTransform SDCGContextTransformFromOrientation(CGImagePropertyOrientation orientation, CGSize size) {
// Inspiration from @libfeihu
......
......@@ -13,6 +13,7 @@
These following graphics context method are provided to easily write cross-platform(AppKit/UIKit) code.
For UIKit, these methods just call the same method in `UIGraphics.h`. See the documentation for usage.
For AppKit, these methods use `NSGraphicsContext` to create image context and match the behavior like UIKit.
@note If you don't care bitmap format (ARGB8888) and just draw image, use `SDGraphicsImageRenderer` instead. It's more performant on RAM usage.`
*/
/// Returns the current graphics context.
......
......@@ -12,6 +12,7 @@
#import <ImageIO/ImageIO.h>
#import "UIImage+Metadata.h"
#import "SDImageHEICCoderInternal.h"
#import "SDImageIOAnimatedCoderInternal.h"
@implementation SDImageIOCoder {
size_t _width, _height;
......@@ -19,6 +20,8 @@
CGImageSourceRef _imageSource;
CGFloat _scale;
BOOL _finished;
BOOL _preserveAspectRatio;
CGSize _thumbnailSize;
}
- (void)dealloc {
......@@ -74,7 +77,33 @@
scale = MAX([scaleFactor doubleValue], 1) ;
}
UIImage *image = [[UIImage alloc] initWithData:data scale:scale];
CGSize thumbnailSize = CGSizeZero;
NSValue *thumbnailSizeValue = options[SDImageCoderDecodeThumbnailPixelSize];
if (thumbnailSizeValue != nil) {
#if SD_MAC
thumbnailSize = thumbnailSizeValue.sizeValue;
#else
thumbnailSize = thumbnailSizeValue.CGSizeValue;
#endif
}
BOOL preserveAspectRatio = YES;
NSNumber *preserveAspectRatioValue = options[SDImageCoderDecodePreserveAspectRatio];
if (preserveAspectRatioValue != nil) {
preserveAspectRatio = preserveAspectRatioValue.boolValue;
}
CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL);
if (!source) {
return nil;
}
UIImage *image = [SDImageIOAnimatedCoder createFrameAtIndex:0 source:source scale:scale preserveAspectRatio:preserveAspectRatio thumbnailSize:thumbnailSize];
CFRelease(source);
if (!image) {
return nil;
}
image.sd_imageFormat = [NSData sd_imageFormatForImageData:data];
return image;
}
......@@ -95,6 +124,22 @@
scale = MAX([scaleFactor doubleValue], 1);
}
_scale = scale;
CGSize thumbnailSize = CGSizeZero;
NSValue *thumbnailSizeValue = options[SDImageCoderDecodeThumbnailPixelSize];
if (thumbnailSizeValue != nil) {
#if SD_MAC
thumbnailSize = thumbnailSizeValue.sizeValue;
#else
thumbnailSize = thumbnailSizeValue.CGSizeValue;
#endif
}
_thumbnailSize = thumbnailSize;
BOOL preserveAspectRatio = YES;
NSNumber *preserveAspectRatioValue = options[SDImageCoderDecodePreserveAspectRatio];
if (preserveAspectRatioValue != nil) {
preserveAspectRatio = preserveAspectRatioValue.boolValue;
}
_preserveAspectRatio = preserveAspectRatio;
#if SD_UIKIT
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveMemoryWarning:) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
#endif
......@@ -140,21 +185,13 @@
if (_width + _height > 0) {
// Create the image
CGImageRef partialImageRef = CGImageSourceCreateImageAtIndex(_imageSource, 0, NULL);
if (partialImageRef) {
CGFloat scale = _scale;
NSNumber *scaleFactor = options[SDImageCoderDecodeScaleFactor];
if (scaleFactor != nil) {
scale = MAX([scaleFactor doubleValue], 1);
}
#if SD_UIKIT || SD_WATCH
UIImageOrientation imageOrientation = [SDImageCoderHelper imageOrientationFromEXIFOrientation:_orientation];
image = [[UIImage alloc] initWithCGImage:partialImageRef scale:scale orientation:imageOrientation];
#else
image = [[UIImage alloc] initWithCGImage:partialImageRef scale:scale orientation:_orientation];
#endif
CGImageRelease(partialImageRef);
CGFloat scale = _scale;
NSNumber *scaleFactor = options[SDImageCoderDecodeScaleFactor];
if (scaleFactor != nil) {
scale = MAX([scaleFactor doubleValue], 1);
}
image = [SDImageIOAnimatedCoder createFrameAtIndex:0 source:_imageSource scale:scale preserveAspectRatio:_preserveAspectRatio thumbnailSize:_thumbnailSize];
if (image) {
CFStringRef uttype = CGImageSourceGetType(_imageSource);
image.sd_imageFormat = [NSData sd_imageFormatFromUTType:uttype];
}
......
......@@ -32,12 +32,25 @@ UIImage * _Nullable SDImageLoaderDecodeImageData(NSData * _Nonnull imageData, NS
BOOL decodeFirstFrame = SD_OPTIONS_CONTAINS(options, SDWebImageDecodeFirstFrameOnly);
NSNumber *scaleValue = context[SDWebImageContextImageScaleFactor];
CGFloat scale = scaleValue.doubleValue >= 1 ? scaleValue.doubleValue : SDImageScaleFactorForKey(cacheKey);
SDImageCoderOptions *coderOptions = @{SDImageCoderDecodeFirstFrameOnly : @(decodeFirstFrame), SDImageCoderDecodeScaleFactor : @(scale)};
if (context) {
SDImageCoderMutableOptions *mutableCoderOptions = [coderOptions mutableCopy];
[mutableCoderOptions setValue:context forKey:SDImageCoderWebImageContext];
coderOptions = [mutableCoderOptions copy];
NSNumber *preserveAspectRatioValue = context[SDWebImageContextImagePreserveAspectRatio];
NSValue *thumbnailSizeValue;
BOOL shouldScaleDown = SD_OPTIONS_CONTAINS(options, SDWebImageScaleDownLargeImages);
if (shouldScaleDown) {
CGFloat thumbnailPixels = SDImageCoderHelper.defaultScaleDownLimitBytes / 4;
CGFloat dimension = ceil(sqrt(thumbnailPixels));
thumbnailSizeValue = @(CGSizeMake(dimension, dimension));
}
if (context[SDWebImageContextImageThumbnailPixelSize]) {
thumbnailSizeValue = context[SDWebImageContextImageThumbnailPixelSize];
}
SDImageCoderMutableOptions *mutableCoderOptions = [NSMutableDictionary dictionaryWithCapacity:2];
mutableCoderOptions[SDImageCoderDecodeFirstFrameOnly] = @(decodeFirstFrame);
mutableCoderOptions[SDImageCoderDecodeScaleFactor] = @(scale);
mutableCoderOptions[SDImageCoderDecodePreserveAspectRatio] = preserveAspectRatioValue;
mutableCoderOptions[SDImageCoderDecodeThumbnailPixelSize] = thumbnailSizeValue;
mutableCoderOptions[SDImageCoderWebImageContext] = context;
SDImageCoderOptions *coderOptions = [mutableCoderOptions copy];
if (!decodeFirstFrame) {
// check whether we should use `SDAnimatedImage`
......@@ -71,12 +84,7 @@ UIImage * _Nullable SDImageLoaderDecodeImageData(NSData * _Nonnull imageData, NS
}
if (shouldDecode) {
BOOL shouldScaleDown = SD_OPTIONS_CONTAINS(options, SDWebImageScaleDownLargeImages);
if (shouldScaleDown) {
image = [SDImageCoderHelper decodedAndScaledDownImageWithImage:image limitBytes:0];
} else {
image = [SDImageCoderHelper decodedImageWithImage:image];
}
image = [SDImageCoderHelper decodedImageWithImage:image];
}
}
......@@ -99,13 +107,26 @@ UIImage * _Nullable SDImageLoaderDecodeProgressiveImageData(NSData * _Nonnull im
BOOL decodeFirstFrame = SD_OPTIONS_CONTAINS(options, SDWebImageDecodeFirstFrameOnly);
NSNumber *scaleValue = context[SDWebImageContextImageScaleFactor];
CGFloat scale = scaleValue.doubleValue >= 1 ? scaleValue.doubleValue : SDImageScaleFactorForKey(cacheKey);
SDImageCoderOptions *coderOptions = @{SDImageCoderDecodeFirstFrameOnly : @(decodeFirstFrame), SDImageCoderDecodeScaleFactor : @(scale)};
if (context) {
SDImageCoderMutableOptions *mutableCoderOptions = [coderOptions mutableCopy];
[mutableCoderOptions setValue:context forKey:SDImageCoderWebImageContext];
coderOptions = [mutableCoderOptions copy];
NSNumber *preserveAspectRatioValue = context[SDWebImageContextImagePreserveAspectRatio];
NSValue *thumbnailSizeValue;
BOOL shouldScaleDown = SD_OPTIONS_CONTAINS(options, SDWebImageScaleDownLargeImages);
if (shouldScaleDown) {
CGFloat thumbnailPixels = SDImageCoderHelper.defaultScaleDownLimitBytes / 4;
CGFloat dimension = ceil(sqrt(thumbnailPixels));
thumbnailSizeValue = @(CGSizeMake(dimension, dimension));
}
if (context[SDWebImageContextImageThumbnailPixelSize]) {
thumbnailSizeValue = context[SDWebImageContextImageThumbnailPixelSize];
}
SDImageCoderMutableOptions *mutableCoderOptions = [NSMutableDictionary dictionaryWithCapacity:2];
mutableCoderOptions[SDImageCoderDecodeFirstFrameOnly] = @(decodeFirstFrame);
mutableCoderOptions[SDImageCoderDecodeScaleFactor] = @(scale);
mutableCoderOptions[SDImageCoderDecodePreserveAspectRatio] = preserveAspectRatioValue;
mutableCoderOptions[SDImageCoderDecodeThumbnailPixelSize] = thumbnailSizeValue;
mutableCoderOptions[SDImageCoderWebImageContext] = context;
SDImageCoderOptions *coderOptions = [mutableCoderOptions copy];
id<SDProgressiveImageCoder> progressiveCoder = objc_getAssociatedObject(operation, SDImageLoaderProgressiveCoderKey);
if (!progressiveCoder) {
// We need to create a new instance for progressive decoding to avoid conflicts
......
......@@ -122,9 +122,12 @@ typedef NS_OPTIONS(NSUInteger, SDWebImageOptions) {
SDWebImageAvoidAutoSetImage = 1 << 10,
/**
* By default, images are decoded respecting their original size. On iOS, this flag will scale down the
* images to a size compatible with the constrained memory of devices.
* This flag take no effect if `SDWebImageAvoidDecodeImage` is set. And it will be ignored if `SDWebImageProgressiveLoad` is set.
* By default, images are decoded respecting their original size.
* This flag will scale down the images to a size compatible with the constrained memory of devices.
* To control the limit memory bytes, check `SDImageCoderHelper.defaultScaleDownLimitBytes` (Defaults to 60MB on iOS)
* This will actually translate to use context option `.imageThumbnailPixelSize` from v5.5.0 (Defaults to (3966, 3966) on iOS). Previously does not.
* This flags effect the progressive and animated images as well from v5.5.0. Previously does not.
* @note If you need detail controls, it's better to use context option `imageThumbnailPixelSize` and `imagePreserveAspectRatio` instead.
*/
SDWebImageScaleDownLargeImages = 1 << 11,
......@@ -217,6 +220,19 @@ FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextImageT
*/
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextImageScaleFactor;
/**
A Boolean value indicating whether to keep the original aspect ratio when generating thumbnail images (or bitmap images from vector format).
Defaults to YES. (NSNumber)
*/
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextImagePreserveAspectRatio;
/**
A CGSize raw value indicating whether or not to generate the thumbnail images (or bitmap images from vector format). When this value is provided, the decoder will generate a thumbnail image which pixel size is smaller than or equal to (depends the `.imagePreserveAspectRatio`) the value size.
@note When you pass `.preserveAspectRatio == NO`, the thumbnail image is stretched to match each dimension. When `.preserveAspectRatio == YES`, the thumbnail image's width is limited to pixel size's width, the thumbnail image's height is limited to pixel size's height. For common cases, you can just pass a square size to limit both.
Defaults to CGSizeZero, which means no thumbnail generation at all. (NSValue)
*/
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextImageThumbnailPixelSize;
/**
A SDImageCacheType raw value which specify the store cache type when the image has just been downloaded and will be stored to the cache. Specify `SDImageCacheTypeNone` to disable cache storage; `SDImageCacheTypeDisk` to store in disk cache only; `SDImageCacheTypeMemory` to store in memory only. And `SDImageCacheTypeAll` to store in both memory cache and disk cache.
If you use image transformer feature, this actually apply for the transformed image, but not the original image itself. Use `SDWebImageContextOriginalStoreCacheType` if you want to control the original image's store cache type at the same time.
......
......@@ -122,6 +122,8 @@ SDWebImageContextOption const SDWebImageContextSetImageOperationKey = @"setImage
SDWebImageContextOption const SDWebImageContextCustomManager = @"customManager";
SDWebImageContextOption const SDWebImageContextImageTransformer = @"imageTransformer";
SDWebImageContextOption const SDWebImageContextImageScaleFactor = @"imageScaleFactor";
SDWebImageContextOption const SDWebImageContextImagePreserveAspectRatio = @"imagePreserveAspectRatio";
SDWebImageContextOption const SDWebImageContextImageThumbnailPixelSize = @"imageThumbnailPixelSize";
SDWebImageContextOption const SDWebImageContextStoreCacheType = @"storeCacheType";
SDWebImageContextOption const SDWebImageContextOriginalStoreCacheType = @"originalStoreCacheType";
SDWebImageContextOption const SDWebImageContextAnimatedImageClass = @"animatedImageClass";
......
......@@ -226,10 +226,11 @@ static void * SDWebImageDownloaderContext = &SDWebImageDownloaderContext;
SD_UNLOCK(self.operationsLock);
};
self.URLOperations[url] = operation;
// Add the handlers before submitting to operation queue, avoid the race condition that operation finished before setting handlers.
downloadOperationCancelToken = [operation addHandlersForProgress:progressBlock completed:completedBlock];
// Add operation to operation queue only after all configuration done according to Apple's doc.
// `addOperation:` does not synchronously execute the `operation.completionBlock` so this will not cause deadlock.
[self.downloadQueue addOperation:operation];
downloadOperationCancelToken = [operation addHandlersForProgress:progressBlock completed:completedBlock];
} else {
// When we reuse the download operation to attach more callbacks, there may be thread safe issue because the getter of callbacks may in another queue (decoding queue or delegate queue)
// So we lock the operation here, and in `SDWebImageDownloaderOperation`, we use `@synchonzied (self)`, to ensure the thread safe between these two classes.
......
......@@ -87,7 +87,7 @@ SDWebImageManager *manager = [SDWebImageManager sharedManager];
[manager loadImageWithURL:imageURL
options:0
progress:nil
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
completed:^(UIImage *image, NSData *data, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
if (image) {
// do something with image
}
......
......@@ -95,19 +95,45 @@ static id<SDImageLoader> _defaultImageLoader;
}
- (nullable NSString *)cacheKeyForURL:(nullable NSURL *)url {
return [self cacheKeyForURL:url cacheKeyFilter:self.cacheKeyFilter];
return [self cacheKeyForURL:url context:nil];
}
- (nullable NSString *)cacheKeyForURL:(nullable NSURL *)url cacheKeyFilter:(id<SDWebImageCacheKeyFilter>)cacheKeyFilter {
- (nullable NSString *)cacheKeyForURL:(nullable NSURL *)url context:(nullable SDWebImageContext *)context {
if (!url) {
return @"";
}
NSString *key;
// Cache Key Filter
id<SDWebImageCacheKeyFilter> cacheKeyFilter = self.cacheKeyFilter;
if (context[SDWebImageContextCacheKeyFilter]) {
cacheKeyFilter = context[SDWebImageContextCacheKeyFilter];
}
if (cacheKeyFilter) {
return [cacheKeyFilter cacheKeyForURL:url];
key = [cacheKeyFilter cacheKeyForURL:url];
} else {
return url.absoluteString;
key = url.absoluteString;
}
// Thumbnail Key Appending
NSValue *thumbnailSizeValue = context[SDWebImageContextImageThumbnailPixelSize];
if (thumbnailSizeValue != nil) {
CGSize thumbnailSize = CGSizeZero;
#if SD_MAC
thumbnailSize = thumbnailSizeValue.sizeValue;
#else
thumbnailSize = thumbnailSizeValue.CGSizeValue;
#endif
BOOL preserveAspectRatio = YES;
NSNumber *preserveAspectRatioValue = context[SDWebImageContextImagePreserveAspectRatio];
if (preserveAspectRatioValue != nil) {
preserveAspectRatio = preserveAspectRatioValue.boolValue;
}
NSString *transformerKey = [NSString stringWithFormat:@"Thumbnail({%f,%f},%d)", thumbnailSize.width, thumbnailSize.height, preserveAspectRatio];
key = SDTransformedKeyForKey(key, transformerKey);
}
return key;
}
- (SDWebImageCombinedOperation *)loadImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDImageLoaderProgressBlock)progressBlock completed:(SDInternalCompletionBlock)completedBlock {
......@@ -188,8 +214,7 @@ static id<SDImageLoader> _defaultImageLoader;
// Check whether we should query cache
BOOL shouldQueryCache = !SD_OPTIONS_CONTAINS(options, SDWebImageFromLoaderOnly);
if (shouldQueryCache) {
id<SDWebImageCacheKeyFilter> cacheKeyFilter = context[SDWebImageContextCacheKeyFilter];
NSString *key = [self cacheKeyForURL:url cacheKeyFilter:cacheKeyFilter];
NSString *key = [self cacheKeyForURL:url context:context];
@weakify(operation);
operation.cacheOperation = [self.imageCache queryImageForKey:key options:options context:context completion:^(UIImage * _Nullable cachedImage, NSData * _Nullable cachedData, SDImageCacheType cacheType) {
@strongify(operation);
......@@ -303,8 +328,7 @@ static id<SDImageLoader> _defaultImageLoader;
if (context[SDWebImageContextOriginalStoreCacheType]) {
originalStoreCacheType = [context[SDWebImageContextOriginalStoreCacheType] integerValue];
}
id<SDWebImageCacheKeyFilter> cacheKeyFilter = context[SDWebImageContextCacheKeyFilter];
NSString *key = [self cacheKeyForURL:url cacheKeyFilter:cacheKeyFilter];
NSString *key = [self cacheKeyForURL:url context:context];
id<SDImageTransformer> transformer = context[SDWebImageContextImageTransformer];
id<SDWebImageCacheSerializer> cacheSerializer = context[SDWebImageContextCacheSerializer];
......@@ -353,8 +377,7 @@ static id<SDImageLoader> _defaultImageLoader;
if (context[SDWebImageContextStoreCacheType]) {
storeCacheType = [context[SDWebImageContextStoreCacheType] integerValue];
}
id<SDWebImageCacheKeyFilter> cacheKeyFilter = context[SDWebImageContextCacheKeyFilter];
NSString *key = [self cacheKeyForURL:url cacheKeyFilter:cacheKeyFilter];
NSString *key = [self cacheKeyForURL:url context:context];
id<SDImageTransformer> transformer = context[SDWebImageContextImageTransformer];
id<SDWebImageCacheSerializer> cacheSerializer = context[SDWebImageContextCacheSerializer];
BOOL shouldTransformImage = originalImage && (!originalImage.sd_isAnimated || (options & SDWebImageTransformAnimatedImage)) && transformer;
......
......@@ -13,5 +13,6 @@
+ (NSTimeInterval)frameDurationAtIndex:(NSUInteger)index source:(nonnull CGImageSourceRef)source;
+ (NSUInteger)imageLoopCountWithSource:(nonnull CGImageSourceRef)source;
+ (nullable UIImage *)createFrameAtIndex:(NSUInteger)index source:(nonnull CGImageSourceRef)source scale:(CGFloat)scale preserveAspectRatio:(BOOL)preserveAspectRatio thumbnailSize:(CGSize)thumbnailSize;
@end
......@@ -65,6 +65,7 @@ FOUNDATION_EXPORT const unsigned char WebImageVersionString[];
#import <SDWebImage/SDImageFrame.h>
#import <SDWebImage/SDImageCoderHelper.h>
#import <SDWebImage/SDImageGraphics.h>
#import <SDWebImage/SDGraphicsImageRenderer.h>
#import <SDWebImage/UIImage+GIF.h>
#import <SDWebImage/UIImage+ForceDecode.h>
#import <SDWebImage/NSData+ImageContentType.h>
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.3</string>
<string>1.0.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -10,14 +10,25 @@
#endif
#endif
#import "LogCategory.h"
#import "NSArray+GM.h"
#import "NSAttributedString+GMSize.h"
#import "NSDate+DateFormat.h"
#import "NSDate+Category.h"
#import "NSDateFormatter+Category.h"
#import "NSDictionary+GM.h"
#import "NSDictionary+json.h"
#import "NSFileManager+FolderSize.h"
#import "NSMutableAttributedString+Attachment.h"
#import "NSNull+Empty.h"
#import "NSObject+KeyboardAnimation.h"
#import "NSObject+GMDate.h"
#import "NSString+Base64.h"
#import "NSString+DateFormat.h"
#import "NSString+Encrypt.h"
#import "NSString+GM.h"
#import "NSString+IconFont.h"
#import "NSString+RegularString.h"
FOUNDATION_EXPORT double GMFoundationVersionNumber;
FOUNDATION_EXPORT const unsigned char GMFoundationVersionString[];
......
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1.6</string>
<string>1.2.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -10,12 +10,18 @@
#endif
#endif
#import "CIContext+fixBug.h"
#import "NSString+Image.h"
#import "UIAlertController+gm.h"
#import "UIButton+ALReClicks.h"
#import "UIButton+GM.h"
#import "UIDevice+Resolutions.h"
#import "UIImage+Compress.h"
#import "UIImage+GM.h"
#import "UILabel+CopyExtern.h"
#import "UIScreen+GM.h"
#import "UITextView+Keyboard.h"
#import "UIView+GMShadow.h"
#import "UIView+Layout.h"
#import "UIView+LineWithAutolayout.h"
#import "UIView+SafeArea.h"
......@@ -46,11 +52,21 @@
#import "GMSafeValue.h"
#import "GMScrollView.h"
#import "GMTableView.h"
#import "GMTableViewCell+Layout.h"
#import "GMTableViewCell.h"
#import "GMTextField.h"
#import "GMTopSearchButton.h"
#import "GMVerticalLayoutButton.h"
#import "GMView.h"
#import "NSObject+EasySubClass.h"
#import "UIImage+GIFImages.h"
#import "UIImage+GMloadImage.h"
#import "UIImage+ImageEffects.h"
#import "UIImage+water.h"
#import "UITextView+LengthLimit.h"
#import "UIView+CornerRadius.h"
#import "UIView+LikeAnimation.h"
#import "UIView+TileSubviews.h"
#import "WYSegmentView.h"
#import "GMReuseIdentifier.h"
......
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/GMKit
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -framework "CoreLocation" -framework "Foundation" -framework "MapKit" -framework "UIKit"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
......
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -l"z" -weak_framework "UIKit"
PODS_BUILD_DIR = ${BUILD_DIR}
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.1.7</string>
<string>0.1.9</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache" "${PODS_ROOT}/../../GMShareSDK/Frameworks"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache" "${PODS_ROOT}/../../GMShareSDK/Frameworks"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public"
PODS_BUILD_DIR = ${BUILD_DIR}
......
......@@ -198,6 +198,29 @@ THE SOFTWARE.
## SnapKit
Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
## TMCache
Apache License
......
......@@ -275,6 +275,35 @@ THE SOFTWARE.
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
</string>
<key>License</key>
<string>MIT</string>
<key>Title</key>
<string>SnapKit</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string> Apache License
......
......@@ -169,6 +169,7 @@ if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework"
install_framework "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework"
install_framework "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework"
install_framework "${BUILT_PRODUCTS_DIR}/TMCache/TMCache.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
......@@ -180,6 +181,7 @@ if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework"
install_framework "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework"
install_framework "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework"
install_framework "${BUILT_PRODUCTS_DIR}/TMCache/TMCache.framework"
fi
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
......
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache" "${PODS_ROOT}/../../GMShareSDK/Frameworks"
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache" "${PODS_ROOT}/../../GMShareSDK/Frameworks"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache/GMCache.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation/GMFoundation.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel/GMJSONModel.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit/GMKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos/GMPhobos.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK/GMShareSDK.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache/TMCache.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DouyinOpenSDK" "${PODS_ROOT}/Headers/Public/WechatOpenSDK" "${PODS_ROOT}/Headers/Public/WeiboSDK"
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache/GMCache.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation/GMFoundation.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel/GMJSONModel.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit/GMKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos/GMPhobos.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK/GMShareSDK.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache/TMCache.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DouyinOpenSDK" "${PODS_ROOT}/Headers/Public/WechatOpenSDK" "${PODS_ROOT}/Headers/Public/WeiboSDK"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/BDOpenSDKKit/BDOpenSDKKit" "${PODS_ROOT}/DouyinOpenSDK/DouyinOpenSDK" "${PODS_ROOT}/WechatOpenSDK/WeChatSDK1.8.6.1" "${PODS_ROOT}/WeiboSDK/libWeiboSDK"
OTHER_LDFLAGS = $(inherited) -ObjC -l"BDOpenSDKKit" -l"DouyinOpenSDK" -l"WeChatSDK" -l"WeiboSDK" -l"c++" -l"sqlite3" -l"sqlite3.0" -l"z" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "GMCache" -framework "GMFoundation" -framework "GMJSONModel" -framework "GMKit" -framework "GMPhobos" -framework "GMShareSDK" -framework "ImageIO" -framework "MBProgressHUD" -framework "MapKit" -framework "Masonry" -framework "Photos" -framework "QuartzCore" -framework "SDWebImage" -framework "Security" -framework "SystemConfiguration" -framework "TMCache" -framework "TencentOpenAPI" -framework "UIKit" -framework "WebKit" -weak_framework "UIKit"
OTHER_LDFLAGS = $(inherited) -ObjC -l"BDOpenSDKKit" -l"DouyinOpenSDK" -l"WeChatSDK" -l"WeiboSDK" -l"c++" -l"sqlite3" -l"sqlite3.0" -l"z" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "GMCache" -framework "GMFoundation" -framework "GMJSONModel" -framework "GMKit" -framework "GMPhobos" -framework "GMShareSDK" -framework "ImageIO" -framework "MBProgressHUD" -framework "MapKit" -framework "Masonry" -framework "Photos" -framework "QuartzCore" -framework "SDWebImage" -framework "Security" -framework "SnapKit" -framework "SystemConfiguration" -framework "TMCache" -framework "TencentOpenAPI" -framework "UIKit" -framework "WebKit" -weak_framework "UIKit"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache" "${PODS_ROOT}/../../GMShareSDK/Frameworks"
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache" "${PODS_ROOT}/../../GMShareSDK/Frameworks"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache/GMCache.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation/GMFoundation.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel/GMJSONModel.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit/GMKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos/GMPhobos.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK/GMShareSDK.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache/TMCache.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DouyinOpenSDK" "${PODS_ROOT}/Headers/Public/WechatOpenSDK" "${PODS_ROOT}/Headers/Public/WeiboSDK"
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache/GMCache.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation/GMFoundation.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel/GMJSONModel.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit/GMKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos/GMPhobos.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK/GMShareSDK.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache/TMCache.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DouyinOpenSDK" "${PODS_ROOT}/Headers/Public/WechatOpenSDK" "${PODS_ROOT}/Headers/Public/WeiboSDK"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/BDOpenSDKKit/BDOpenSDKKit" "${PODS_ROOT}/DouyinOpenSDK/DouyinOpenSDK" "${PODS_ROOT}/WechatOpenSDK/WeChatSDK1.8.6.1" "${PODS_ROOT}/WeiboSDK/libWeiboSDK"
OTHER_LDFLAGS = $(inherited) -ObjC -l"BDOpenSDKKit" -l"DouyinOpenSDK" -l"WeChatSDK" -l"WeiboSDK" -l"c++" -l"sqlite3" -l"sqlite3.0" -l"z" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "GMCache" -framework "GMFoundation" -framework "GMJSONModel" -framework "GMKit" -framework "GMPhobos" -framework "GMShareSDK" -framework "ImageIO" -framework "MBProgressHUD" -framework "MapKit" -framework "Masonry" -framework "Photos" -framework "QuartzCore" -framework "SDWebImage" -framework "Security" -framework "SystemConfiguration" -framework "TMCache" -framework "TencentOpenAPI" -framework "UIKit" -framework "WebKit" -weak_framework "UIKit"
OTHER_LDFLAGS = $(inherited) -ObjC -l"BDOpenSDKKit" -l"DouyinOpenSDK" -l"WeChatSDK" -l"WeiboSDK" -l"c++" -l"sqlite3" -l"sqlite3.0" -l"z" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "GMCache" -framework "GMFoundation" -framework "GMJSONModel" -framework "GMKit" -framework "GMPhobos" -framework "GMShareSDK" -framework "ImageIO" -framework "MBProgressHUD" -framework "MapKit" -framework "Masonry" -framework "Photos" -framework "QuartzCore" -framework "SDWebImage" -framework "Security" -framework "SnapKit" -framework "SystemConfiguration" -framework "TMCache" -framework "TencentOpenAPI" -framework "UIKit" -framework "WebKit" -weak_framework "UIKit"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache" "${PODS_ROOT}/../../GMShareSDK/Frameworks"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache" "${PODS_ROOT}/../../GMShareSDK/Frameworks"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache/GMCache.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation/GMFoundation.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel/GMJSONModel.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit/GMKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos/GMPhobos.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK/GMShareSDK.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache/TMCache.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DouyinOpenSDK" "${PODS_ROOT}/Headers/Public/WechatOpenSDK" "${PODS_ROOT}/Headers/Public/WeiboSDK"
OTHER_LDFLAGS = $(inherited) -l"c++" -l"sqlite3" -l"sqlite3.0" -l"z" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "GMCache" -framework "GMFoundation" -framework "GMJSONModel" -framework "GMKit" -framework "GMPhobos" -framework "ImageIO" -framework "MBProgressHUD" -framework "MapKit" -framework "Masonry" -framework "Photos" -framework "QuartzCore" -framework "SDWebImage" -framework "Security" -framework "SystemConfiguration" -framework "TMCache" -framework "UIKit" -framework "WebKit" -weak_framework "UIKit"
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache/GMCache.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation/GMFoundation.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel/GMJSONModel.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit/GMKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos/GMPhobos.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK/GMShareSDK.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache/TMCache.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DouyinOpenSDK" "${PODS_ROOT}/Headers/Public/WechatOpenSDK" "${PODS_ROOT}/Headers/Public/WeiboSDK"
OTHER_LDFLAGS = $(inherited) -l"c++" -l"sqlite3" -l"sqlite3.0" -l"z" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "GMCache" -framework "GMFoundation" -framework "GMJSONModel" -framework "GMKit" -framework "GMPhobos" -framework "ImageIO" -framework "MBProgressHUD" -framework "MapKit" -framework "Masonry" -framework "Photos" -framework "QuartzCore" -framework "SDWebImage" -framework "Security" -framework "SnapKit" -framework "SystemConfiguration" -framework "TMCache" -framework "UIKit" -framework "WebKit" -weak_framework "UIKit"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache" "${PODS_ROOT}/../../GMShareSDK/Frameworks"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache" "${PODS_ROOT}/../../GMShareSDK/Frameworks"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache/GMCache.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation/GMFoundation.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel/GMJSONModel.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit/GMKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos/GMPhobos.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK/GMShareSDK.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache/TMCache.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DouyinOpenSDK" "${PODS_ROOT}/Headers/Public/WechatOpenSDK" "${PODS_ROOT}/Headers/Public/WeiboSDK"
OTHER_LDFLAGS = $(inherited) -l"c++" -l"sqlite3" -l"sqlite3.0" -l"z" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "GMCache" -framework "GMFoundation" -framework "GMJSONModel" -framework "GMKit" -framework "GMPhobos" -framework "ImageIO" -framework "MBProgressHUD" -framework "MapKit" -framework "Masonry" -framework "Photos" -framework "QuartzCore" -framework "SDWebImage" -framework "Security" -framework "SystemConfiguration" -framework "TMCache" -framework "UIKit" -framework "WebKit" -weak_framework "UIKit"
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GMCache/GMCache.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMFoundation/GMFoundation.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMJSONModel/GMJSONModel.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMKit/GMKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMPhobos/GMPhobos.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GMShareSDK/GMShareSDK.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/TMCache/TMCache.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DouyinOpenSDK" "${PODS_ROOT}/Headers/Public/WechatOpenSDK" "${PODS_ROOT}/Headers/Public/WeiboSDK"
OTHER_LDFLAGS = $(inherited) -l"c++" -l"sqlite3" -l"sqlite3.0" -l"z" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "GMCache" -framework "GMFoundation" -framework "GMJSONModel" -framework "GMKit" -framework "GMPhobos" -framework "ImageIO" -framework "MBProgressHUD" -framework "MapKit" -framework "Masonry" -framework "Photos" -framework "QuartzCore" -framework "SDWebImage" -framework "Security" -framework "SnapKit" -framework "SystemConfiguration" -framework "TMCache" -framework "UIKit" -framework "WebKit" -weak_framework "UIKit"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.4.0</string>
<string>5.5.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -19,6 +19,7 @@
#import "SDAnimatedImageView+WebCache.h"
#import "SDAnimatedImageView.h"
#import "SDDiskCache.h"
#import "SDGraphicsImageRenderer.h"
#import "SDImageAPNGCoder.h"
#import "SDImageCache.h"
#import "SDImageCacheConfig.h"
......
......@@ -9,4 +9,18 @@
@implementation GMShareBaseObject
+ (JSONKeyMapper*)keyMapper
{
/**将类似"order_id": 104的json 解析成 @property (assign, nonatomic) int orderId;
即使修改为驼峰命名法
*/
return [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase];
}
//所有的属性都是可选的,order_id即使为空,不会引起崩溃
+ (BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment