Compare commits
No commits in common. "2.4.5" and "master" have entirely different histories.
@ -39,7 +39,7 @@
|
|||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
0ABF8340F735722CEE937FA3 /* libPods-PNObject_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PNObject_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
0ABF8340F735722CEE937FA3 /* libPods-PNObject_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PNObject_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
116AF818F8117B91EF290C9A /* Pods-PNObject_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PNObject_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example.release.xcconfig"; sourceTree = "<group>"; };
|
116AF818F8117B91EF290C9A /* Pods-PNObject_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PNObject_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
2661CEE1F223361CD1DACC25 /* PNObject.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = PNObject.podspec; path = ../PNObject.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
|
2661CEE1F223361CD1DACC25 /* PNObject.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = PNObject.podspec; path = ../PNObject.podspec; sourceTree = "<group>"; };
|
||||||
3E392C278361604C1602CAF0 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
|
3E392C278361604C1602CAF0 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
|
||||||
6003F58A195388D20070C39A /* PNObject_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PNObject_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
6003F58A195388D20070C39A /* PNObject_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PNObject_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||||
@ -351,7 +351,7 @@
|
|||||||
);
|
);
|
||||||
name = "[CP] Copy Pods Resources";
|
name = "[CP] Copy Pods Resources";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FacebookSDKStrings.bundle",
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}",
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||||
{
|
{
|
||||||
|
|
||||||
[FBSDKSettings setAppID:@"213761522305123"];
|
[FBSDKSettings setAppID:@"213761522305123"];
|
||||||
|
|
||||||
[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
|
[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
|
||||||
@ -33,22 +34,22 @@
|
|||||||
// Override point for customization after application launch.
|
// Override point for customization after application launch.
|
||||||
|
|
||||||
[PNObjectConfig initSharedInstanceForEnvironments:@{EnvironmentDevelopment : @{BaseUrl:@"http://pnobject.local/",EndpointPath:@"api/v1/"},
|
[PNObjectConfig initSharedInstanceForEnvironments:@{EnvironmentDevelopment : @{BaseUrl:@"http://pnobject.local/",EndpointPath:@"api/v1/"},
|
||||||
EnvironmentStage : @{BaseUrl:@"https://pnobject.stage.it/",EndpointPath:@"api/v1/"},
|
EnvironmentStage : @{BaseUrl:@"http://pnobject.stage.it/",EndpointPath:@"api/v1/"},
|
||||||
EnvironmentProduction : @{BaseUrl:@"http://pnobject.prod.it/",EndpointPath:@"api/v1/"},
|
EnvironmentProduction : @{BaseUrl:@"http://pnobject.prod.it/",EndpointPath:@"api/v1/"},
|
||||||
} andUserSubclass:[PNUser class]];
|
} userSubclass:[PNUser class] withOauthMode:OAuthModeClientCredential];
|
||||||
|
|
||||||
/** Can user special char %@ to autoset EndpointPath to Oauth endpointPath */
|
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentStage];
|
||||||
[[PNObjectConfig sharedInstance] setClientID:@"******" clientSecret:@"******" oAuthEndpointAction:@"%@oauth-token" oauthMode:OAuthModeClientCredential refreshTokenEnabled:NO forEnv:EnvironmentStage];
|
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentProduction];
|
||||||
[[PNObjectConfig sharedInstance] setClientID:@"******" clientSecret:@"******" oAuthEndpointAction:@"%@oauth-token" oauthMode:OAuthModePassword refreshTokenEnabled:NO forEnv:EnvironmentStage];
|
|
||||||
|
|
||||||
[[PNObjectConfig sharedInstance] setOauthUserName:@"admin" oauthPassword:@"admin" forEnv:EnvironmentStage];
|
|
||||||
|
|
||||||
[[PNObjectConfig sharedInstance] setEnvironment:EnvironmentStage];
|
[[PNObjectConfig sharedInstance] setEnvironment:EnvironmentStage];
|
||||||
|
//[[PNObjectConfig sharedInstance] setHTTPHeaderValue:@"XMLHttpRequest" forKey:@"X-Request-With"];
|
||||||
|
|
||||||
NSLogDebug(@"%@",[[PNObjectConfig sharedInstance] baseUrl]);
|
NSLogDebug(@"%@",[[PNObjectConfig sharedInstance] baseUrl]);
|
||||||
NSLogDebug(@"%@",[[PNObjectConfig sharedInstance] endPointPath]);
|
NSLogDebug(@"%@",[[PNObjectConfig sharedInstance] endPointPath]);
|
||||||
NSLogDebug(@"%@",[[PNObjectConfig sharedInstance] endPointUrl]);
|
NSLogDebug(@"%@",[[PNObjectConfig sharedInstance] endPointUrl]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PNObjViewController *viewController = [[PNObjViewController alloc] init];
|
PNObjViewController *viewController = [[PNObjViewController alloc] init];
|
||||||
|
|
||||||
switch ([[UIDevice currentDevice] deviceFamily]) {
|
switch ([[UIDevice currentDevice] deviceFamily]) {
|
||||||
|
|||||||
@ -93,21 +93,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void) refreshTokenAction {
|
- (void) refreshTokenAction {
|
||||||
[[PNObjectConfig sharedInstance] refreshTokenForClientCredentialWithBlockSuccess:^(BOOL refreshSuccess) {
|
[[PNObjectConfig sharedInstance] refreshTokenForClientCredential];
|
||||||
|
|
||||||
[PNUser loginCurrentUserWithUsername:@"test" password:@"test" withBlockSuccess:^(PNUser * _Nullable responseObject) {
|
|
||||||
|
|
||||||
NSLog(@"success");
|
|
||||||
} failure:^(NSError * _Nonnull error) {
|
|
||||||
NSLog(@"%@",error);
|
|
||||||
}];
|
|
||||||
} failure:^(NSError * _Nonnull error) {
|
|
||||||
|
|
||||||
}];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) cancelTokenAction {
|
- (void) cancelTokenAction {
|
||||||
[[PNObjectConfig sharedInstance] resetAllTokens];
|
[[PNObjectConfig sharedInstance] resetToken];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) apiCallAction {
|
- (void) apiCallAction {
|
||||||
|
|||||||
@ -1,18 +1,18 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- AFNetworking (3.2.0):
|
- AFNetworking (3.1.0):
|
||||||
- AFNetworking/NSURLSession (= 3.2.0)
|
- AFNetworking/NSURLSession (= 3.1.0)
|
||||||
- AFNetworking/Reachability (= 3.2.0)
|
- AFNetworking/Reachability (= 3.1.0)
|
||||||
- AFNetworking/Security (= 3.2.0)
|
- AFNetworking/Security (= 3.1.0)
|
||||||
- AFNetworking/Serialization (= 3.2.0)
|
- AFNetworking/Serialization (= 3.1.0)
|
||||||
- AFNetworking/UIKit (= 3.2.0)
|
- AFNetworking/UIKit (= 3.1.0)
|
||||||
- AFNetworking/NSURLSession (3.2.0):
|
- AFNetworking/NSURLSession (3.1.0):
|
||||||
- AFNetworking/Reachability
|
- AFNetworking/Reachability
|
||||||
- AFNetworking/Security
|
- AFNetworking/Security
|
||||||
- AFNetworking/Serialization
|
- AFNetworking/Serialization
|
||||||
- AFNetworking/Reachability (3.2.0)
|
- AFNetworking/Reachability (3.1.0)
|
||||||
- AFNetworking/Security (3.2.0)
|
- AFNetworking/Security (3.1.0)
|
||||||
- AFNetworking/Serialization (3.2.0)
|
- AFNetworking/Serialization (3.1.0)
|
||||||
- AFNetworking/UIKit (3.2.0):
|
- AFNetworking/UIKit (3.1.0):
|
||||||
- AFNetworking/NSURLSession
|
- AFNetworking/NSURLSession
|
||||||
- Bolts (1.9.0):
|
- Bolts (1.9.0):
|
||||||
- Bolts/AppLinks (= 1.9.0)
|
- Bolts/AppLinks (= 1.9.0)
|
||||||
@ -26,19 +26,19 @@ PODS:
|
|||||||
- DJLocalization/Core (= 1.2.2)
|
- DJLocalization/Core (= 1.2.2)
|
||||||
- DJLocalization/Core (1.2.2)
|
- DJLocalization/Core (1.2.2)
|
||||||
- Expecta (1.0.6)
|
- Expecta (1.0.6)
|
||||||
- FBSDKCoreKit (4.31.1):
|
- FBSDKCoreKit (4.29.0):
|
||||||
- Bolts (~> 1.7)
|
- Bolts (~> 1.7)
|
||||||
- FBSDKLoginKit (4.31.1):
|
- FBSDKLoginKit (4.29.0):
|
||||||
|
- FBSDKCoreKit
|
||||||
|
- FBSDKShareKit (4.29.0):
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
- FBSDKShareKit (4.31.1):
|
|
||||||
- FBSDKCoreKit (~> 4.31.1)
|
|
||||||
- NSDataAES (0.2.2)
|
- NSDataAES (0.2.2)
|
||||||
- NSDate_Utils (1.1.0):
|
- NSDate_Utils (1.1.0):
|
||||||
- DJLocalization
|
- DJLocalization
|
||||||
- NSString-Helper (1.0.6)
|
- NSString-Helper (1.0.5)
|
||||||
- nv-ios-http-status (0.0.1)
|
- nv-ios-http-status (0.0.1)
|
||||||
- PEAR-FileManager-iOS (1.3.1)
|
- PEAR-FileManager-iOS (1.3.1)
|
||||||
- PNObject (2.4.5):
|
- PNObject (1.3.4):
|
||||||
- AFNetworking
|
- AFNetworking
|
||||||
- CodFis-Helper
|
- CodFis-Helper
|
||||||
- DDDKeychainWrapper
|
- DDDKeychainWrapper
|
||||||
@ -58,7 +58,7 @@ PODS:
|
|||||||
- RZDataBinding (2.1.0)
|
- RZDataBinding (2.1.0)
|
||||||
- Specta (1.0.7)
|
- Specta (1.0.7)
|
||||||
- StrongestPasswordValidator (0.1.2)
|
- StrongestPasswordValidator (0.1.2)
|
||||||
- UIDevice-Utils (1.0.7)
|
- UIDevice-Utils (1.0.0)
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- Expecta
|
- Expecta
|
||||||
@ -71,27 +71,27 @@ EXTERNAL SOURCES:
|
|||||||
:path: ../
|
:path: ../
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
AFNetworking: 8ac6017b94ea105479f7776e5288e48ae9c59bb4
|
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
|
||||||
Bolts: ac6567323eac61e203f6a9763667d0f711be34c8
|
Bolts: ac6567323eac61e203f6a9763667d0f711be34c8
|
||||||
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
||||||
DDDKeychainWrapper: e681a4daba6448786fa83b4941f58102a33b1897
|
DDDKeychainWrapper: e681a4daba6448786fa83b4941f58102a33b1897
|
||||||
DJLocalization: 0c84029af375647d4104a42ae36be87194c46c47
|
DJLocalization: 0c84029af375647d4104a42ae36be87194c46c47
|
||||||
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
|
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
|
||||||
FBSDKCoreKit: e08ccfcefa7bc1347a07c276dac9bf6c7fe57024
|
FBSDKCoreKit: 6f139173dc63a1deaff4430a55f2fe5bb222d2af
|
||||||
FBSDKLoginKit: 99797ac39252fef6f72600b886f6ee60b4b29cab
|
FBSDKLoginKit: 56a057ca6822535ea0faa25f57a7c41edb697fd4
|
||||||
FBSDKShareKit: e640c41c9fcd61929eeb3d0c21ad335103e7cb62
|
FBSDKShareKit: 18a2cd118aef11dd657fe7e8b64bae5c719088b2
|
||||||
NSDataAES: 967ea3337476a80e9838a533c25d570a06855ed0
|
NSDataAES: 967ea3337476a80e9838a533c25d570a06855ed0
|
||||||
NSDate_Utils: c858a89da6e204ecf53aca48dbccb4da4d25bc9e
|
NSDate_Utils: c858a89da6e204ecf53aca48dbccb4da4d25bc9e
|
||||||
NSString-Helper: 389265918b2a4c5b0d09f0e03c607e8e5e254dd7
|
NSString-Helper: 459e1b6a62b3bf7db10f01b0d102548608e945c4
|
||||||
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
||||||
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
||||||
PNObject: e754ef3f56399808cdb48af39d610c8132f2effe
|
PNObject: 8dc560680a7a48060ed309b019ca4fc41505cc07
|
||||||
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
|
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
|
||||||
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
|
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
|
||||||
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
|
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
|
||||||
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
|
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
|
||||||
UIDevice-Utils: 8ff812220ce91e97a2cea243bd4160e7b958ec76
|
UIDevice-Utils: ff37bd042127117572d6ce4c5ff074f4f54ab5ed
|
||||||
|
|
||||||
PODFILE CHECKSUM: fcd5d1cf3426c7c9c5b3e5edcd4b8e5402ee7f2e
|
PODFILE CHECKSUM: fcd5d1cf3426c7c9c5b3e5edcd4b8e5402ee7f2e
|
||||||
|
|
||||||
COCOAPODS: 1.4.0
|
COCOAPODS: 1.3.1
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
## Methods to Override
|
## Methods to Override
|
||||||
|
|
||||||
To change the behavior of all data task operation construction, which is also used in the `GET` / `POST` / et al. convenience methods, override `dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:`.
|
To change the behavior of all data task operation construction, which is also used in the `GET` / `POST` / et al. convenience methods, override `dataTaskWithRequest:completionHandler:`.
|
||||||
|
|
||||||
## Serialization
|
## Serialization
|
||||||
|
|
||||||
@ -94,15 +94,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
*/
|
*/
|
||||||
@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;
|
@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;
|
||||||
|
|
||||||
///-------------------------------
|
|
||||||
/// @name Managing Security Policy
|
|
||||||
///-------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
The security policy used by created session to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified. A security policy configured with `AFSSLPinningModePublicKey` or `AFSSLPinningModeCertificate` can only be applied on a session manager initialized with a secure base URL (i.e. https). Applying a security policy with pinning enabled on an insecure session manager throws an `Invalid Security Policy` exception.
|
|
||||||
*/
|
|
||||||
@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;
|
|
||||||
|
|
||||||
///---------------------
|
///---------------------
|
||||||
/// @name Initialization
|
/// @name Initialization
|
||||||
///---------------------
|
///---------------------
|
||||||
|
|||||||
@ -98,23 +98,6 @@
|
|||||||
[super setResponseSerializer:responseSerializer];
|
[super setResponseSerializer:responseSerializer];
|
||||||
}
|
}
|
||||||
|
|
||||||
@dynamic securityPolicy;
|
|
||||||
|
|
||||||
- (void)setSecurityPolicy:(AFSecurityPolicy *)securityPolicy {
|
|
||||||
if (securityPolicy.SSLPinningMode != AFSSLPinningModeNone && ![self.baseURL.scheme isEqualToString:@"https"]) {
|
|
||||||
NSString *pinningMode = @"Unknown Pinning Mode";
|
|
||||||
switch (securityPolicy.SSLPinningMode) {
|
|
||||||
case AFSSLPinningModeNone: pinningMode = @"AFSSLPinningModeNone"; break;
|
|
||||||
case AFSSLPinningModeCertificate: pinningMode = @"AFSSLPinningModeCertificate"; break;
|
|
||||||
case AFSSLPinningModePublicKey: pinningMode = @"AFSSLPinningModePublicKey"; break;
|
|
||||||
}
|
|
||||||
NSString *reason = [NSString stringWithFormat:@"A security policy configured with `%@` can only be applied on a manager with a secure base URL (i.e. https)", pinningMode];
|
|
||||||
@throw [NSException exceptionWithName:@"Invalid Security Policy" reason:reason userInfo:nil];
|
|
||||||
}
|
|
||||||
|
|
||||||
[super setSecurityPolicy:securityPolicy];
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
||||||
- (NSURLSessionDataTask *)GET:(NSString *)URLString
|
- (NSURLSessionDataTask *)GET:(NSString *)URLString
|
||||||
@ -203,9 +186,12 @@
|
|||||||
NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError];
|
NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError];
|
||||||
if (serializationError) {
|
if (serializationError) {
|
||||||
if (failure) {
|
if (failure) {
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wgnu"
|
||||||
dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
|
dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
|
||||||
failure(nil, serializationError);
|
failure(nil, serializationError);
|
||||||
});
|
});
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil;
|
return nil;
|
||||||
@ -276,9 +262,12 @@
|
|||||||
NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError];
|
NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError];
|
||||||
if (serializationError) {
|
if (serializationError) {
|
||||||
if (failure) {
|
if (failure) {
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wgnu"
|
||||||
dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
|
dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
|
||||||
failure(nil, serializationError);
|
failure(nil, serializationError);
|
||||||
});
|
});
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil;
|
return nil;
|
||||||
|
|||||||
@ -107,13 +107,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
*/
|
*/
|
||||||
- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER;
|
- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER;
|
||||||
|
|
||||||
/**
|
|
||||||
* Initializes an instance of a network reachability manager
|
|
||||||
*
|
|
||||||
* @return nil as this method is unavailable
|
|
||||||
*/
|
|
||||||
- (nullable instancetype)init NS_UNAVAILABLE;
|
|
||||||
|
|
||||||
///--------------------------------------------------
|
///--------------------------------------------------
|
||||||
/// @name Starting & Stopping Reachability Monitoring
|
/// @name Starting & Stopping Reachability Monitoring
|
||||||
///--------------------------------------------------
|
///--------------------------------------------------
|
||||||
|
|||||||
@ -51,6 +51,8 @@ static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) {
|
|||||||
static id AFPublicKeyForCertificate(NSData *certificate) {
|
static id AFPublicKeyForCertificate(NSData *certificate) {
|
||||||
id allowedPublicKey = nil;
|
id allowedPublicKey = nil;
|
||||||
SecCertificateRef allowedCertificate;
|
SecCertificateRef allowedCertificate;
|
||||||
|
SecCertificateRef allowedCertificates[1];
|
||||||
|
CFArrayRef tempCertificates = nil;
|
||||||
SecPolicyRef policy = nil;
|
SecPolicyRef policy = nil;
|
||||||
SecTrustRef allowedTrust = nil;
|
SecTrustRef allowedTrust = nil;
|
||||||
SecTrustResultType result;
|
SecTrustResultType result;
|
||||||
@ -58,8 +60,11 @@ static id AFPublicKeyForCertificate(NSData *certificate) {
|
|||||||
allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificate);
|
allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificate);
|
||||||
__Require_Quiet(allowedCertificate != NULL, _out);
|
__Require_Quiet(allowedCertificate != NULL, _out);
|
||||||
|
|
||||||
|
allowedCertificates[0] = allowedCertificate;
|
||||||
|
tempCertificates = CFArrayCreate(NULL, (const void **)allowedCertificates, 1, NULL);
|
||||||
|
|
||||||
policy = SecPolicyCreateBasicX509();
|
policy = SecPolicyCreateBasicX509();
|
||||||
__Require_noErr_Quiet(SecTrustCreateWithCertificates(allowedCertificate, policy, &allowedTrust), _out);
|
__Require_noErr_Quiet(SecTrustCreateWithCertificates(tempCertificates, policy, &allowedTrust), _out);
|
||||||
__Require_noErr_Quiet(SecTrustEvaluate(allowedTrust, &result), _out);
|
__Require_noErr_Quiet(SecTrustEvaluate(allowedTrust, &result), _out);
|
||||||
|
|
||||||
allowedPublicKey = (__bridge_transfer id)SecTrustCopyPublicKey(allowedTrust);
|
allowedPublicKey = (__bridge_transfer id)SecTrustCopyPublicKey(allowedTrust);
|
||||||
@ -73,6 +78,10 @@ _out:
|
|||||||
CFRelease(policy);
|
CFRelease(policy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tempCertificates) {
|
||||||
|
CFRelease(tempCertificates);
|
||||||
|
}
|
||||||
|
|
||||||
if (allowedCertificate) {
|
if (allowedCertificate) {
|
||||||
CFRelease(allowedCertificate);
|
CFRelease(allowedCertificate);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,7 +60,10 @@ NSString * AFPercentEscapedStringFromString(NSString *string) {
|
|||||||
NSMutableString *escaped = @"".mutableCopy;
|
NSMutableString *escaped = @"".mutableCopy;
|
||||||
|
|
||||||
while (index < string.length) {
|
while (index < string.length) {
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wgnu"
|
||||||
NSUInteger length = MIN(string.length - index, batchSize);
|
NSUInteger length = MIN(string.length - index, batchSize);
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
NSRange range = NSMakeRange(index, length);
|
NSRange range = NSMakeRange(index, length);
|
||||||
|
|
||||||
// To avoid breaking up character sequences such as 👴🏻👮🏽
|
// To avoid breaking up character sequences such as 👴🏻👮🏽
|
||||||
@ -186,7 +189,6 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb
|
|||||||
@interface AFHTTPRequestSerializer ()
|
@interface AFHTTPRequestSerializer ()
|
||||||
@property (readwrite, nonatomic, strong) NSMutableSet *mutableObservedChangedKeyPaths;
|
@property (readwrite, nonatomic, strong) NSMutableSet *mutableObservedChangedKeyPaths;
|
||||||
@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableHTTPRequestHeaders;
|
@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableHTTPRequestHeaders;
|
||||||
@property (readwrite, nonatomic, strong) dispatch_queue_t requestHeaderModificationQueue;
|
|
||||||
@property (readwrite, nonatomic, assign) AFHTTPRequestQueryStringSerializationStyle queryStringSerializationStyle;
|
@property (readwrite, nonatomic, assign) AFHTTPRequestQueryStringSerializationStyle queryStringSerializationStyle;
|
||||||
@property (readwrite, nonatomic, copy) AFQueryStringSerializationBlock queryStringSerialization;
|
@property (readwrite, nonatomic, copy) AFQueryStringSerializationBlock queryStringSerialization;
|
||||||
@end
|
@end
|
||||||
@ -206,7 +208,6 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb
|
|||||||
self.stringEncoding = NSUTF8StringEncoding;
|
self.stringEncoding = NSUTF8StringEncoding;
|
||||||
|
|
||||||
self.mutableHTTPRequestHeaders = [NSMutableDictionary dictionary];
|
self.mutableHTTPRequestHeaders = [NSMutableDictionary dictionary];
|
||||||
self.requestHeaderModificationQueue = dispatch_queue_create("requestHeaderModificationQueue", DISPATCH_QUEUE_CONCURRENT);
|
|
||||||
|
|
||||||
// Accept-Language HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4
|
// Accept-Language HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4
|
||||||
NSMutableArray *acceptLanguagesComponents = [NSMutableArray array];
|
NSMutableArray *acceptLanguagesComponents = [NSMutableArray array];
|
||||||
@ -218,6 +219,8 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb
|
|||||||
[self setValue:[acceptLanguagesComponents componentsJoinedByString:@", "] forHTTPHeaderField:@"Accept-Language"];
|
[self setValue:[acceptLanguagesComponents componentsJoinedByString:@", "] forHTTPHeaderField:@"Accept-Language"];
|
||||||
|
|
||||||
NSString *userAgent = nil;
|
NSString *userAgent = nil;
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wgnu"
|
||||||
#if TARGET_OS_IOS
|
#if TARGET_OS_IOS
|
||||||
// User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43
|
// User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43
|
||||||
userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]];
|
userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]];
|
||||||
@ -227,6 +230,7 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb
|
|||||||
#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
|
#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
|
||||||
userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]];
|
userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]];
|
||||||
#endif
|
#endif
|
||||||
|
#pragma clang diagnostic pop
|
||||||
if (userAgent) {
|
if (userAgent) {
|
||||||
if (![userAgent canBeConvertedToEncoding:NSASCIIStringEncoding]) {
|
if (![userAgent canBeConvertedToEncoding:NSASCIIStringEncoding]) {
|
||||||
NSMutableString *mutableUserAgent = [userAgent mutableCopy];
|
NSMutableString *mutableUserAgent = [userAgent mutableCopy];
|
||||||
@ -302,27 +306,17 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb
|
|||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
||||||
- (NSDictionary *)HTTPRequestHeaders {
|
- (NSDictionary *)HTTPRequestHeaders {
|
||||||
NSDictionary __block *value;
|
return [NSDictionary dictionaryWithDictionary:self.mutableHTTPRequestHeaders];
|
||||||
dispatch_sync(self.requestHeaderModificationQueue, ^{
|
|
||||||
value = [NSDictionary dictionaryWithDictionary:self.mutableHTTPRequestHeaders];
|
|
||||||
});
|
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setValue:(NSString *)value
|
- (void)setValue:(NSString *)value
|
||||||
forHTTPHeaderField:(NSString *)field
|
forHTTPHeaderField:(NSString *)field
|
||||||
{
|
{
|
||||||
dispatch_barrier_async(self.requestHeaderModificationQueue, ^{
|
[self.mutableHTTPRequestHeaders setValue:value forKey:field];
|
||||||
[self.mutableHTTPRequestHeaders setValue:value forKey:field];
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)valueForHTTPHeaderField:(NSString *)field {
|
- (NSString *)valueForHTTPHeaderField:(NSString *)field {
|
||||||
NSString __block *value;
|
return [self.mutableHTTPRequestHeaders valueForKey:field];
|
||||||
dispatch_sync(self.requestHeaderModificationQueue, ^{
|
|
||||||
value = [self.mutableHTTPRequestHeaders valueForKey:field];
|
|
||||||
});
|
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username
|
- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username
|
||||||
@ -334,9 +328,7 @@ forHTTPHeaderField:(NSString *)field
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)clearAuthorizationHeader {
|
- (void)clearAuthorizationHeader {
|
||||||
dispatch_barrier_async(self.requestHeaderModificationQueue, ^{
|
[self.mutableHTTPRequestHeaders removeObjectForKey:@"Authorization"];
|
||||||
[self.mutableHTTPRequestHeaders removeObjectForKey:@"Authorization"];
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
@ -568,9 +560,7 @@ forHTTPHeaderField:(NSString *)field
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)encodeWithCoder:(NSCoder *)coder {
|
- (void)encodeWithCoder:(NSCoder *)coder {
|
||||||
dispatch_sync(self.requestHeaderModificationQueue, ^{
|
[coder encodeObject:self.mutableHTTPRequestHeaders forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))];
|
||||||
[coder encodeObject:self.mutableHTTPRequestHeaders forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))];
|
|
||||||
});
|
|
||||||
[coder encodeInteger:self.queryStringSerializationStyle forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))];
|
[coder encodeInteger:self.queryStringSerializationStyle forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -578,9 +568,7 @@ forHTTPHeaderField:(NSString *)field
|
|||||||
|
|
||||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||||
AFHTTPRequestSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
AFHTTPRequestSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
||||||
dispatch_sync(self.requestHeaderModificationQueue, ^{
|
serializer.mutableHTTPRequestHeaders = [self.mutableHTTPRequestHeaders mutableCopyWithZone:zone];
|
||||||
serializer.mutableHTTPRequestHeaders = [self.mutableHTTPRequestHeaders mutableCopyWithZone:zone];
|
|
||||||
});
|
|
||||||
serializer.queryStringSerializationStyle = self.queryStringSerializationStyle;
|
serializer.queryStringSerializationStyle = self.queryStringSerializationStyle;
|
||||||
serializer.queryStringSerialization = self.queryStringSerialization;
|
serializer.queryStringSerialization = self.queryStringSerialization;
|
||||||
|
|
||||||
@ -679,11 +667,6 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setRequest:(NSMutableURLRequest *)request
|
|
||||||
{
|
|
||||||
_request = [request mutableCopy];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
|
- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
|
||||||
name:(NSString *)name
|
name:(NSString *)name
|
||||||
error:(NSError * __autoreleasing *)error
|
error:(NSError * __autoreleasing *)error
|
||||||
@ -852,11 +835,14 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation AFMultipartBodyStream
|
@implementation AFMultipartBodyStream
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wimplicit-atomic-properties"
|
||||||
#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1100)
|
#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1100)
|
||||||
@synthesize delegate;
|
@synthesize delegate;
|
||||||
#endif
|
#endif
|
||||||
@synthesize streamStatus;
|
@synthesize streamStatus;
|
||||||
@synthesize streamError;
|
@synthesize streamError;
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding {
|
- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
@ -902,6 +888,8 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
|
|||||||
|
|
||||||
NSInteger totalNumberOfBytesRead = 0;
|
NSInteger totalNumberOfBytesRead = 0;
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wgnu"
|
||||||
while ((NSUInteger)totalNumberOfBytesRead < MIN(length, self.numberOfBytesInPacket)) {
|
while ((NSUInteger)totalNumberOfBytesRead < MIN(length, self.numberOfBytesInPacket)) {
|
||||||
if (!self.currentHTTPBodyPart || ![self.currentHTTPBodyPart hasBytesAvailable]) {
|
if (!self.currentHTTPBodyPart || ![self.currentHTTPBodyPart hasBytesAvailable]) {
|
||||||
if (!(self.currentHTTPBodyPart = [self.HTTPBodyPartEnumerator nextObject])) {
|
if (!(self.currentHTTPBodyPart = [self.HTTPBodyPartEnumerator nextObject])) {
|
||||||
@ -922,6 +910,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
return totalNumberOfBytesRead;
|
return totalNumberOfBytesRead;
|
||||||
}
|
}
|
||||||
@ -1102,6 +1091,8 @@ typedef enum {
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wcovered-switch-default"
|
||||||
switch (self.inputStream.streamStatus) {
|
switch (self.inputStream.streamStatus) {
|
||||||
case NSStreamStatusNotOpen:
|
case NSStreamStatusNotOpen:
|
||||||
case NSStreamStatusOpening:
|
case NSStreamStatusOpening:
|
||||||
@ -1115,6 +1106,7 @@ typedef enum {
|
|||||||
default:
|
default:
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSInteger)read:(uint8_t *)buffer
|
- (NSInteger)read:(uint8_t *)buffer
|
||||||
@ -1159,8 +1151,11 @@ typedef enum {
|
|||||||
intoBuffer:(uint8_t *)buffer
|
intoBuffer:(uint8_t *)buffer
|
||||||
maxLength:(NSUInteger)length
|
maxLength:(NSUInteger)length
|
||||||
{
|
{
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wgnu"
|
||||||
NSRange range = NSMakeRange((NSUInteger)_phaseReadOffset, MIN([data length] - ((NSUInteger)_phaseReadOffset), length));
|
NSRange range = NSMakeRange((NSUInteger)_phaseReadOffset, MIN([data length] - ((NSUInteger)_phaseReadOffset), length));
|
||||||
[data getBytes:buffer range:range];
|
[data getBytes:buffer range:range];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
_phaseReadOffset += range.length;
|
_phaseReadOffset += range.length;
|
||||||
|
|
||||||
@ -1179,6 +1174,8 @@ typedef enum {
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wcovered-switch-default"
|
||||||
switch (_phase) {
|
switch (_phase) {
|
||||||
case AFEncapsulationBoundaryPhase:
|
case AFEncapsulationBoundaryPhase:
|
||||||
_phase = AFHeaderPhase;
|
_phase = AFHeaderPhase;
|
||||||
@ -1198,6 +1195,7 @@ typedef enum {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_phaseReadOffset = 0;
|
_phaseReadOffset = 0;
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
@ -1259,21 +1257,7 @@ typedef enum {
|
|||||||
[mutableRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
|
[mutableRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (![NSJSONSerialization isValidJSONObject:parameters]) {
|
[mutableRequest setHTTPBody:[NSJSONSerialization dataWithJSONObject:parameters options:self.writingOptions error:error]];
|
||||||
if (error) {
|
|
||||||
NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"The `parameters` argument is not valid JSON.", @"AFNetworking", nil)};
|
|
||||||
*error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:userInfo];
|
|
||||||
}
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parameters options:self.writingOptions error:error];
|
|
||||||
|
|
||||||
if (!jsonData) {
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
[mutableRequest setHTTPBody:jsonData];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return mutableRequest;
|
return mutableRequest;
|
||||||
@ -1352,13 +1336,7 @@ typedef enum {
|
|||||||
[mutableRequest setValue:@"application/x-plist" forHTTPHeaderField:@"Content-Type"];
|
[mutableRequest setValue:@"application/x-plist" forHTTPHeaderField:@"Content-Type"];
|
||||||
}
|
}
|
||||||
|
|
||||||
NSData *plistData = [NSPropertyListSerialization dataWithPropertyList:parameters format:self.format options:self.writeOptions error:error];
|
[mutableRequest setHTTPBody:[NSPropertyListSerialization dataWithPropertyList:parameters format:self.format options:self.writeOptions error:error]];
|
||||||
|
|
||||||
if (!plistData) {
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
[mutableRequest setHTTPBody:plistData];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return mutableRequest;
|
return mutableRequest;
|
||||||
|
|||||||
@ -57,7 +57,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
- (instancetype)init;
|
- (instancetype)init;
|
||||||
|
|
||||||
@property (nonatomic, assign) NSStringEncoding stringEncoding DEPRECATED_MSG_ATTRIBUTE("The string encoding is never used. AFHTTPResponseSerializer only validates status codes and content types but does not try to decode the received data in any way.");
|
/**
|
||||||
|
The string encoding used to serialize data received from the server, when no string encoding is specified by the response. `NSUTF8StringEncoding` by default.
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) NSStringEncoding stringEncoding;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Creates and returns a serializer with default configuration.
|
Creates and returns a serializer with default configuration.
|
||||||
@ -108,8 +111,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
- `application/json`
|
- `application/json`
|
||||||
- `text/json`
|
- `text/json`
|
||||||
- `text/javascript`
|
- `text/javascript`
|
||||||
|
|
||||||
In RFC 7159 - Section 8.1, it states that JSON text is required to be encoded in UTF-8, UTF-16, or UTF-32, and the default encoding is UTF-8. NSJSONSerialization provides support for all the encodings listed in the specification, and recommends UTF-8 for efficiency. Using an unsupported encoding will result in serialization error. See the `NSJSONSerialization` documentation for more details.
|
|
||||||
*/
|
*/
|
||||||
@interface AFJSONResponseSerializer : AFHTTPResponseSerializer
|
@interface AFJSONResponseSerializer : AFHTTPResponseSerializer
|
||||||
|
|
||||||
@ -165,7 +166,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
- (instancetype)init;
|
- (instancetype)init;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSXMLDocument` documentation section "Input and Output Options". `0` by default.
|
Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default.
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, assign) NSUInteger options;
|
@property (nonatomic, assign) NSUInteger options;
|
||||||
|
|
||||||
|
|||||||
@ -97,6 +97,8 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
|||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.stringEncoding = NSUTF8StringEncoding;
|
||||||
|
|
||||||
self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)];
|
self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)];
|
||||||
self.acceptableContentTypes = nil;
|
self.acceptableContentTypes = nil;
|
||||||
|
|
||||||
@ -240,28 +242,23 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
id responseObject = nil;
|
||||||
|
NSError *serializationError = nil;
|
||||||
// Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization.
|
// Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization.
|
||||||
// See https://github.com/rails/rails/issues/1742
|
// See https://github.com/rails/rails/issues/1742
|
||||||
BOOL isSpace = [data isEqualToData:[NSData dataWithBytes:" " length:1]];
|
BOOL isSpace = [data isEqualToData:[NSData dataWithBytes:" " length:1]];
|
||||||
|
if (data.length > 0 && !isSpace) {
|
||||||
if (data.length == 0 || isSpace) {
|
responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError];
|
||||||
|
} else {
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSError *serializationError = nil;
|
if (self.removesKeysWithNullValues && responseObject) {
|
||||||
|
responseObject = AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions);
|
||||||
id responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError];
|
|
||||||
|
|
||||||
if (!responseObject)
|
|
||||||
{
|
|
||||||
if (error) {
|
|
||||||
*error = AFErrorWithUnderlyingError(serializationError, *error);
|
|
||||||
}
|
|
||||||
return nil;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.removesKeysWithNullValues) {
|
if (error) {
|
||||||
return AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions);
|
*error = AFErrorWithUnderlyingError(serializationError, *error);
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseObject;
|
return responseObject;
|
||||||
@ -291,7 +288,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
|||||||
#pragma mark - NSCopying
|
#pragma mark - NSCopying
|
||||||
|
|
||||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||||
AFJSONResponseSerializer *serializer = [super copyWithZone:zone];
|
AFJSONResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
||||||
serializer.readingOptions = self.readingOptions;
|
serializer.readingOptions = self.readingOptions;
|
||||||
serializer.removesKeysWithNullValues = self.removesKeysWithNullValues;
|
serializer.removesKeysWithNullValues = self.removesKeysWithNullValues;
|
||||||
|
|
||||||
@ -381,12 +378,8 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
|||||||
NSError *serializationError = nil;
|
NSError *serializationError = nil;
|
||||||
NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:data options:self.options error:&serializationError];
|
NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:data options:self.options error:&serializationError];
|
||||||
|
|
||||||
if (!document)
|
if (error) {
|
||||||
{
|
*error = AFErrorWithUnderlyingError(serializationError, *error);
|
||||||
if (error) {
|
|
||||||
*error = AFErrorWithUnderlyingError(serializationError, *error);
|
|
||||||
}
|
|
||||||
return nil;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return document;
|
return document;
|
||||||
@ -414,7 +407,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
|||||||
#pragma mark - NSCopying
|
#pragma mark - NSCopying
|
||||||
|
|
||||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||||
AFXMLDocumentResponseSerializer *serializer = [super copyWithZone:zone];
|
AFXMLDocumentResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
||||||
serializer.options = self.options;
|
serializer.options = self.options;
|
||||||
|
|
||||||
return serializer;
|
return serializer;
|
||||||
@ -465,20 +458,15 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data) {
|
id responseObject;
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
NSError *serializationError = nil;
|
NSError *serializationError = nil;
|
||||||
|
|
||||||
id responseObject = [NSPropertyListSerialization propertyListWithData:data options:self.readOptions format:NULL error:&serializationError];
|
if (data) {
|
||||||
|
responseObject = [NSPropertyListSerialization propertyListWithData:data options:self.readOptions format:NULL error:&serializationError];
|
||||||
|
}
|
||||||
|
|
||||||
if (!responseObject)
|
if (error) {
|
||||||
{
|
*error = AFErrorWithUnderlyingError(serializationError, *error);
|
||||||
if (error) {
|
|
||||||
*error = AFErrorWithUnderlyingError(serializationError, *error);
|
|
||||||
}
|
|
||||||
return nil;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseObject;
|
return responseObject;
|
||||||
@ -508,7 +496,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
|||||||
#pragma mark - NSCopying
|
#pragma mark - NSCopying
|
||||||
|
|
||||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||||
AFPropertyListResponseSerializer *serializer = [super copyWithZone:zone];
|
AFPropertyListResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
||||||
serializer.format = self.format;
|
serializer.format = self.format;
|
||||||
serializer.readOptions = self.readOptions;
|
serializer.readOptions = self.readOptions;
|
||||||
|
|
||||||
@ -734,7 +722,7 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r
|
|||||||
#pragma mark - NSCopying
|
#pragma mark - NSCopying
|
||||||
|
|
||||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||||
AFImageResponseSerializer *serializer = [super copyWithZone:zone];
|
AFImageResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
||||||
|
|
||||||
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
|
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
|
||||||
serializer.imageScale = self.imageScale;
|
serializer.imageScale = self.imageScale;
|
||||||
@ -808,7 +796,7 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r
|
|||||||
#pragma mark - NSCopying
|
#pragma mark - NSCopying
|
||||||
|
|
||||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||||
AFCompoundResponseSerializer *serializer = [super copyWithZone:zone];
|
AFCompoundResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
||||||
serializer.responseSerializers = self.responseSerializers;
|
serializer.responseSerializers = self.responseSerializers;
|
||||||
|
|
||||||
return serializer;
|
return serializer;
|
||||||
|
|||||||
@ -208,7 +208,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
|
@param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
|
||||||
*/
|
*/
|
||||||
- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
|
- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
|
||||||
completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler DEPRECATED_ATTRIBUTE;
|
completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Creates an `NSURLSessionDataTask` with the specified request.
|
Creates an `NSURLSessionDataTask` with the specified request.
|
||||||
@ -354,7 +354,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response.
|
@param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response.
|
||||||
*/
|
*/
|
||||||
- (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * _Nullable (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block;
|
- (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`.
|
Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`.
|
||||||
|
|||||||
@ -85,6 +85,8 @@ static NSString * const AFURLSessionManagerLockName = @"com.alamofire.networking
|
|||||||
|
|
||||||
static NSUInteger const AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask = 3;
|
static NSUInteger const AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask = 3;
|
||||||
|
|
||||||
|
static void * AFTaskStateChangedContext = &AFTaskStateChangedContext;
|
||||||
|
|
||||||
typedef void (^AFURLSessionDidBecomeInvalidBlock)(NSURLSession *session, NSError *error);
|
typedef void (^AFURLSessionDidBecomeInvalidBlock)(NSURLSession *session, NSError *error);
|
||||||
typedef NSURLSessionAuthChallengeDisposition (^AFURLSessionDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential);
|
typedef NSURLSessionAuthChallengeDisposition (^AFURLSessionDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential);
|
||||||
|
|
||||||
@ -112,7 +114,6 @@ typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id re
|
|||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
||||||
@interface AFURLSessionManagerTaskDelegate : NSObject <NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate>
|
@interface AFURLSessionManagerTaskDelegate : NSObject <NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate>
|
||||||
- (instancetype)initWithTask:(NSURLSessionTask *)task;
|
|
||||||
@property (nonatomic, weak) AFURLSessionManager *manager;
|
@property (nonatomic, weak) AFURLSessionManager *manager;
|
||||||
@property (nonatomic, strong) NSMutableData *mutableData;
|
@property (nonatomic, strong) NSMutableData *mutableData;
|
||||||
@property (nonatomic, strong) NSProgress *uploadProgress;
|
@property (nonatomic, strong) NSProgress *uploadProgress;
|
||||||
@ -126,54 +127,113 @@ typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id re
|
|||||||
|
|
||||||
@implementation AFURLSessionManagerTaskDelegate
|
@implementation AFURLSessionManagerTaskDelegate
|
||||||
|
|
||||||
- (instancetype)initWithTask:(NSURLSessionTask *)task {
|
- (instancetype)init {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (!self) {
|
if (!self) {
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
_mutableData = [NSMutableData data];
|
self.mutableData = [NSMutableData data];
|
||||||
_uploadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
|
self.uploadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
|
||||||
_downloadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
|
self.uploadProgress.totalUnitCount = NSURLSessionTransferSizeUnknown;
|
||||||
|
|
||||||
__weak __typeof__(task) weakTask = task;
|
self.downloadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
|
||||||
for (NSProgress *progress in @[ _uploadProgress, _downloadProgress ])
|
self.downloadProgress.totalUnitCount = NSURLSessionTransferSizeUnknown;
|
||||||
{
|
|
||||||
progress.totalUnitCount = NSURLSessionTransferSizeUnknown;
|
|
||||||
progress.cancellable = YES;
|
|
||||||
progress.cancellationHandler = ^{
|
|
||||||
[weakTask cancel];
|
|
||||||
};
|
|
||||||
progress.pausable = YES;
|
|
||||||
progress.pausingHandler = ^{
|
|
||||||
[weakTask suspend];
|
|
||||||
};
|
|
||||||
#if __has_warning("-Wunguarded-availability-new")
|
|
||||||
if (@available(iOS 9, macOS 10.11, *)) {
|
|
||||||
#else
|
|
||||||
if ([progress respondsToSelector:@selector(setResumingHandler:)]) {
|
|
||||||
#endif
|
|
||||||
progress.resumingHandler = ^{
|
|
||||||
[weakTask resume];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
[progress addObserver:self
|
|
||||||
forKeyPath:NSStringFromSelector(@selector(fractionCompleted))
|
|
||||||
options:NSKeyValueObservingOptionNew
|
|
||||||
context:NULL];
|
|
||||||
}
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)dealloc {
|
|
||||||
[self.downloadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))];
|
|
||||||
[self.uploadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))];
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark - NSProgress Tracking
|
#pragma mark - NSProgress Tracking
|
||||||
|
|
||||||
|
- (void)setupProgressForTask:(NSURLSessionTask *)task {
|
||||||
|
__weak __typeof__(task) weakTask = task;
|
||||||
|
|
||||||
|
self.uploadProgress.totalUnitCount = task.countOfBytesExpectedToSend;
|
||||||
|
self.downloadProgress.totalUnitCount = task.countOfBytesExpectedToReceive;
|
||||||
|
[self.uploadProgress setCancellable:YES];
|
||||||
|
[self.uploadProgress setCancellationHandler:^{
|
||||||
|
__typeof__(weakTask) strongTask = weakTask;
|
||||||
|
[strongTask cancel];
|
||||||
|
}];
|
||||||
|
[self.uploadProgress setPausable:YES];
|
||||||
|
[self.uploadProgress setPausingHandler:^{
|
||||||
|
__typeof__(weakTask) strongTask = weakTask;
|
||||||
|
[strongTask suspend];
|
||||||
|
}];
|
||||||
|
if ([self.uploadProgress respondsToSelector:@selector(setResumingHandler:)]) {
|
||||||
|
[self.uploadProgress setResumingHandler:^{
|
||||||
|
__typeof__(weakTask) strongTask = weakTask;
|
||||||
|
[strongTask resume];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self.downloadProgress setCancellable:YES];
|
||||||
|
[self.downloadProgress setCancellationHandler:^{
|
||||||
|
__typeof__(weakTask) strongTask = weakTask;
|
||||||
|
[strongTask cancel];
|
||||||
|
}];
|
||||||
|
[self.downloadProgress setPausable:YES];
|
||||||
|
[self.downloadProgress setPausingHandler:^{
|
||||||
|
__typeof__(weakTask) strongTask = weakTask;
|
||||||
|
[strongTask suspend];
|
||||||
|
}];
|
||||||
|
|
||||||
|
if ([self.downloadProgress respondsToSelector:@selector(setResumingHandler:)]) {
|
||||||
|
[self.downloadProgress setResumingHandler:^{
|
||||||
|
__typeof__(weakTask) strongTask = weakTask;
|
||||||
|
[strongTask resume];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
[task addObserver:self
|
||||||
|
forKeyPath:NSStringFromSelector(@selector(countOfBytesReceived))
|
||||||
|
options:NSKeyValueObservingOptionNew
|
||||||
|
context:NULL];
|
||||||
|
[task addObserver:self
|
||||||
|
forKeyPath:NSStringFromSelector(@selector(countOfBytesExpectedToReceive))
|
||||||
|
options:NSKeyValueObservingOptionNew
|
||||||
|
context:NULL];
|
||||||
|
|
||||||
|
[task addObserver:self
|
||||||
|
forKeyPath:NSStringFromSelector(@selector(countOfBytesSent))
|
||||||
|
options:NSKeyValueObservingOptionNew
|
||||||
|
context:NULL];
|
||||||
|
[task addObserver:self
|
||||||
|
forKeyPath:NSStringFromSelector(@selector(countOfBytesExpectedToSend))
|
||||||
|
options:NSKeyValueObservingOptionNew
|
||||||
|
context:NULL];
|
||||||
|
|
||||||
|
[self.downloadProgress addObserver:self
|
||||||
|
forKeyPath:NSStringFromSelector(@selector(fractionCompleted))
|
||||||
|
options:NSKeyValueObservingOptionNew
|
||||||
|
context:NULL];
|
||||||
|
[self.uploadProgress addObserver:self
|
||||||
|
forKeyPath:NSStringFromSelector(@selector(fractionCompleted))
|
||||||
|
options:NSKeyValueObservingOptionNew
|
||||||
|
context:NULL];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)cleanUpProgressForTask:(NSURLSessionTask *)task {
|
||||||
|
[task removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesReceived))];
|
||||||
|
[task removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesExpectedToReceive))];
|
||||||
|
[task removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesSent))];
|
||||||
|
[task removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesExpectedToSend))];
|
||||||
|
[self.downloadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))];
|
||||||
|
[self.uploadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context {
|
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context {
|
||||||
if ([object isEqual:self.downloadProgress]) {
|
if ([object isKindOfClass:[NSURLSessionTask class]] || [object isKindOfClass:[NSURLSessionDownloadTask class]]) {
|
||||||
|
if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesReceived))]) {
|
||||||
|
self.downloadProgress.completedUnitCount = [change[NSKeyValueChangeNewKey] longLongValue];
|
||||||
|
} else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesExpectedToReceive))]) {
|
||||||
|
self.downloadProgress.totalUnitCount = [change[NSKeyValueChangeNewKey] longLongValue];
|
||||||
|
} else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesSent))]) {
|
||||||
|
self.uploadProgress.completedUnitCount = [change[NSKeyValueChangeNewKey] longLongValue];
|
||||||
|
} else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesExpectedToSend))]) {
|
||||||
|
self.uploadProgress.totalUnitCount = [change[NSKeyValueChangeNewKey] longLongValue];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ([object isEqual:self.downloadProgress]) {
|
||||||
if (self.downloadProgressBlock) {
|
if (self.downloadProgressBlock) {
|
||||||
self.downloadProgressBlock(object);
|
self.downloadProgressBlock(object);
|
||||||
}
|
}
|
||||||
@ -191,6 +251,8 @@ typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id re
|
|||||||
task:(NSURLSessionTask *)task
|
task:(NSURLSessionTask *)task
|
||||||
didCompleteWithError:(NSError *)error
|
didCompleteWithError:(NSError *)error
|
||||||
{
|
{
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wgnu"
|
||||||
__strong AFURLSessionManager *manager = self.manager;
|
__strong AFURLSessionManager *manager = self.manager;
|
||||||
|
|
||||||
__block id responseObject = nil;
|
__block id responseObject = nil;
|
||||||
@ -252,60 +314,33 @@ didCompleteWithError:(NSError *)error
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - NSURLSessionDataDelegate
|
#pragma mark - NSURLSessionDataTaskDelegate
|
||||||
|
|
||||||
- (void)URLSession:(__unused NSURLSession *)session
|
- (void)URLSession:(__unused NSURLSession *)session
|
||||||
dataTask:(__unused NSURLSessionDataTask *)dataTask
|
dataTask:(__unused NSURLSessionDataTask *)dataTask
|
||||||
didReceiveData:(NSData *)data
|
didReceiveData:(NSData *)data
|
||||||
{
|
{
|
||||||
self.downloadProgress.totalUnitCount = dataTask.countOfBytesExpectedToReceive;
|
|
||||||
self.downloadProgress.completedUnitCount = dataTask.countOfBytesReceived;
|
|
||||||
|
|
||||||
[self.mutableData appendData:data];
|
[self.mutableData appendData:data];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task
|
#pragma mark - NSURLSessionDownloadTaskDelegate
|
||||||
didSendBodyData:(int64_t)bytesSent
|
|
||||||
totalBytesSent:(int64_t)totalBytesSent
|
|
||||||
totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend{
|
|
||||||
|
|
||||||
self.uploadProgress.totalUnitCount = task.countOfBytesExpectedToSend;
|
|
||||||
self.uploadProgress.completedUnitCount = task.countOfBytesSent;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark - NSURLSessionDownloadDelegate
|
|
||||||
|
|
||||||
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask
|
|
||||||
didWriteData:(int64_t)bytesWritten
|
|
||||||
totalBytesWritten:(int64_t)totalBytesWritten
|
|
||||||
totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite{
|
|
||||||
|
|
||||||
self.downloadProgress.totalUnitCount = totalBytesExpectedToWrite;
|
|
||||||
self.downloadProgress.completedUnitCount = totalBytesWritten;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask
|
|
||||||
didResumeAtOffset:(int64_t)fileOffset
|
|
||||||
expectedTotalBytes:(int64_t)expectedTotalBytes{
|
|
||||||
|
|
||||||
self.downloadProgress.totalUnitCount = expectedTotalBytes;
|
|
||||||
self.downloadProgress.completedUnitCount = fileOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)URLSession:(NSURLSession *)session
|
- (void)URLSession:(NSURLSession *)session
|
||||||
downloadTask:(NSURLSessionDownloadTask *)downloadTask
|
downloadTask:(NSURLSessionDownloadTask *)downloadTask
|
||||||
didFinishDownloadingToURL:(NSURL *)location
|
didFinishDownloadingToURL:(NSURL *)location
|
||||||
{
|
{
|
||||||
|
NSError *fileManagerError = nil;
|
||||||
self.downloadFileURL = nil;
|
self.downloadFileURL = nil;
|
||||||
|
|
||||||
if (self.downloadTaskDidFinishDownloading) {
|
if (self.downloadTaskDidFinishDownloading) {
|
||||||
self.downloadFileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location);
|
self.downloadFileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location);
|
||||||
if (self.downloadFileURL) {
|
if (self.downloadFileURL) {
|
||||||
NSError *fileManagerError = nil;
|
[[NSFileManager defaultManager] moveItemAtURL:location toURL:self.downloadFileURL error:&fileManagerError];
|
||||||
|
|
||||||
if (![[NSFileManager defaultManager] moveItemAtURL:location toURL:self.downloadFileURL error:&fileManagerError]) {
|
if (fileManagerError) {
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:fileManagerError.userInfo];
|
[[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:fileManagerError.userInfo];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -573,6 +608,7 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
|||||||
|
|
||||||
[self.lock lock];
|
[self.lock lock];
|
||||||
self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)] = delegate;
|
self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)] = delegate;
|
||||||
|
[delegate setupProgressForTask:task];
|
||||||
[self addNotificationObserverForTask:task];
|
[self addNotificationObserverForTask:task];
|
||||||
[self.lock unlock];
|
[self.lock unlock];
|
||||||
}
|
}
|
||||||
@ -582,7 +618,7 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
|||||||
downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock
|
downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock
|
||||||
completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
|
completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
|
||||||
{
|
{
|
||||||
AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] initWithTask:dataTask];
|
AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init];
|
||||||
delegate.manager = self;
|
delegate.manager = self;
|
||||||
delegate.completionHandler = completionHandler;
|
delegate.completionHandler = completionHandler;
|
||||||
|
|
||||||
@ -597,7 +633,7 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
|||||||
progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock
|
progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock
|
||||||
completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
|
completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
|
||||||
{
|
{
|
||||||
AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] initWithTask:uploadTask];
|
AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init];
|
||||||
delegate.manager = self;
|
delegate.manager = self;
|
||||||
delegate.completionHandler = completionHandler;
|
delegate.completionHandler = completionHandler;
|
||||||
|
|
||||||
@ -613,7 +649,7 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
|||||||
destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
|
destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
|
||||||
completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler
|
completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler
|
||||||
{
|
{
|
||||||
AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] initWithTask:downloadTask];
|
AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init];
|
||||||
delegate.manager = self;
|
delegate.manager = self;
|
||||||
delegate.completionHandler = completionHandler;
|
delegate.completionHandler = completionHandler;
|
||||||
|
|
||||||
@ -633,7 +669,9 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
|||||||
- (void)removeDelegateForTask:(NSURLSessionTask *)task {
|
- (void)removeDelegateForTask:(NSURLSessionTask *)task {
|
||||||
NSParameterAssert(task);
|
NSParameterAssert(task);
|
||||||
|
|
||||||
|
AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task];
|
||||||
[self.lock lock];
|
[self.lock lock];
|
||||||
|
[delegate cleanUpProgressForTask:task];
|
||||||
[self removeNotificationObserverForTask:task];
|
[self removeNotificationObserverForTask:task];
|
||||||
[self.mutableTaskDelegatesKeyedByTaskIdentifier removeObjectForKey:@(task.taskIdentifier)];
|
[self.mutableTaskDelegatesKeyedByTaskIdentifier removeObjectForKey:@(task.taskIdentifier)];
|
||||||
[self.lock unlock];
|
[self.lock unlock];
|
||||||
@ -682,11 +720,13 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
|||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
||||||
- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks {
|
- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks {
|
||||||
if (cancelPendingTasks) {
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[self.session invalidateAndCancel];
|
if (cancelPendingTasks) {
|
||||||
} else {
|
[self.session invalidateAndCancel];
|
||||||
[self.session finishTasksAndInvalidate];
|
} else {
|
||||||
}
|
[self.session finishTasksAndInvalidate];
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
@ -741,21 +781,16 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
|||||||
__block NSURLSessionUploadTask *uploadTask = nil;
|
__block NSURLSessionUploadTask *uploadTask = nil;
|
||||||
url_session_manager_create_task_safely(^{
|
url_session_manager_create_task_safely(^{
|
||||||
uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
|
uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
|
||||||
|
|
||||||
// uploadTask may be nil on iOS7 because uploadTaskWithRequest:fromFile: may return nil despite being documented as nonnull (https://devforums.apple.com/message/926113#926113)
|
|
||||||
if (!uploadTask && self.attemptsToRecreateUploadTasksForBackgroundSessions && self.session.configuration.identifier) {
|
|
||||||
for (NSUInteger attempts = 0; !uploadTask && attempts < AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask; attempts++) {
|
|
||||||
uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (uploadTask) {
|
if (!uploadTask && self.attemptsToRecreateUploadTasksForBackgroundSessions && self.session.configuration.identifier) {
|
||||||
[self addDelegateForUploadTask:uploadTask
|
for (NSUInteger attempts = 0; !uploadTask && attempts < AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask; attempts++) {
|
||||||
progress:uploadProgressBlock
|
uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
|
||||||
completionHandler:completionHandler];
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler];
|
||||||
|
|
||||||
return uploadTask;
|
return uploadTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1039,12 +1074,6 @@ totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task];
|
|
||||||
|
|
||||||
if (delegate) {
|
|
||||||
[delegate URLSession:session task:task didSendBodyData:bytesSent totalBytesSent:totalBytesSent totalBytesExpectedToSend:totalBytesExpectedToSend];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (self.taskDidSendBodyData) {
|
if (self.taskDidSendBodyData) {
|
||||||
self.taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalUnitCount);
|
self.taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalUnitCount);
|
||||||
}
|
}
|
||||||
@ -1150,8 +1179,8 @@ didFinishDownloadingToURL:(NSURL *)location
|
|||||||
if (fileURL) {
|
if (fileURL) {
|
||||||
delegate.downloadFileURL = fileURL;
|
delegate.downloadFileURL = fileURL;
|
||||||
NSError *error = nil;
|
NSError *error = nil;
|
||||||
|
[[NSFileManager defaultManager] moveItemAtURL:location toURL:fileURL error:&error];
|
||||||
if (![[NSFileManager defaultManager] moveItemAtURL:location toURL:fileURL error:&error]) {
|
if (error) {
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:error.userInfo];
|
[[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:error.userInfo];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1170,13 +1199,6 @@ didFinishDownloadingToURL:(NSURL *)location
|
|||||||
totalBytesWritten:(int64_t)totalBytesWritten
|
totalBytesWritten:(int64_t)totalBytesWritten
|
||||||
totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
|
totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
|
||||||
{
|
{
|
||||||
|
|
||||||
AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask];
|
|
||||||
|
|
||||||
if (delegate) {
|
|
||||||
[delegate URLSession:session downloadTask:downloadTask didWriteData:bytesWritten totalBytesWritten:totalBytesWritten totalBytesExpectedToWrite:totalBytesExpectedToWrite];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (self.downloadTaskDidWriteData) {
|
if (self.downloadTaskDidWriteData) {
|
||||||
self.downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite);
|
self.downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite);
|
||||||
}
|
}
|
||||||
@ -1187,13 +1209,6 @@ totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
|
|||||||
didResumeAtOffset:(int64_t)fileOffset
|
didResumeAtOffset:(int64_t)fileOffset
|
||||||
expectedTotalBytes:(int64_t)expectedTotalBytes
|
expectedTotalBytes:(int64_t)expectedTotalBytes
|
||||||
{
|
{
|
||||||
|
|
||||||
AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask];
|
|
||||||
|
|
||||||
if (delegate) {
|
|
||||||
[delegate URLSession:session downloadTask:downloadTask didResumeAtOffset:fileOffset expectedTotalBytes:expectedTotalBytes];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (self.downloadTaskDidResume) {
|
if (self.downloadTaskDidResume) {
|
||||||
self.downloadTaskDidResume(session, downloadTask, fileOffset, expectedTotalBytes);
|
self.downloadTaskDidResume(session, downloadTask, fileOffset, expectedTotalBytes);
|
||||||
}
|
}
|
||||||
|
|||||||
2
Example/Pods/AFNetworking/LICENSE
generated
2
Example/Pods/AFNetworking/LICENSE
generated
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2011-2016 Alamofire Software Foundation (http://alamofire.org/)
|
Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
12
Example/Pods/AFNetworking/README.md
generated
12
Example/Pods/AFNetworking/README.md
generated
@ -9,7 +9,7 @@
|
|||||||
[](http://cocoadocs.org/docsets/AFNetworking)
|
[](http://cocoadocs.org/docsets/AFNetworking)
|
||||||
[](http://twitter.com/AFNetworking)
|
[](http://twitter.com/AFNetworking)
|
||||||
|
|
||||||
AFNetworking is a delightful networking library for iOS, macOS, watchOS, and tvOS. It's built on top of the [Foundation URL Loading System](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html), extending the powerful high-level networking abstractions built into Cocoa. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use.
|
AFNetworking is a delightful networking library for iOS and Mac OS X. It's built on top of the [Foundation URL Loading System](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html), extending the powerful high-level networking abstractions built into Cocoa. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use.
|
||||||
|
|
||||||
Perhaps the most important feature of all, however, is the amazing community of developers who use and contribute to AFNetworking every day. AFNetworking powers some of the most popular and critically-acclaimed apps on the iPhone, iPad, and Mac.
|
Perhaps the most important feature of all, however, is the amazing community of developers who use and contribute to AFNetworking every day. AFNetworking powers some of the most popular and critically-acclaimed apps on the iPhone, iPad, and Mac.
|
||||||
|
|
||||||
@ -51,9 +51,7 @@ To integrate AFNetworking into your Xcode project using CocoaPods, specify it in
|
|||||||
source 'https://github.com/CocoaPods/Specs.git'
|
source 'https://github.com/CocoaPods/Specs.git'
|
||||||
platform :ios, '8.0'
|
platform :ios, '8.0'
|
||||||
|
|
||||||
target 'TargetName' do
|
|
||||||
pod 'AFNetworking', '~> 3.0'
|
pod 'AFNetworking', '~> 3.0'
|
||||||
end
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, run the following command:
|
Then, run the following command:
|
||||||
@ -83,7 +81,7 @@ Run `carthage` to build the framework and drag the built `AFNetworking.framework
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
| AFNetworking Version | Minimum iOS Target | Minimum macOS Target | Minimum watchOS Target | Minimum tvOS Target | Notes |
|
| AFNetworking Version | Minimum iOS Target | Minimum OS X Target | Minimum watchOS Target | Minimum tvOS Target | Notes |
|
||||||
|:--------------------:|:---------------------------:|:----------------------------:|:----------------------------:|:----------------------------:|:-------------------------------------------------------------------------:|
|
|:--------------------:|:---------------------------:|:----------------------------:|:----------------------------:|:----------------------------:|:-------------------------------------------------------------------------:|
|
||||||
| 3.x | iOS 7 | OS X 10.9 | watchOS 2.0 | tvOS 9.0 | Xcode 7+ is required. `NSURLConnectionOperation` support has been removed. |
|
| 3.x | iOS 7 | OS X 10.9 | watchOS 2.0 | tvOS 9.0 | Xcode 7+ is required. `NSURLConnectionOperation` support has been removed. |
|
||||||
| 2.6 -> 2.6.3 | iOS 7 | OS X 10.9 | watchOS 2.0 | n/a | Xcode 7+ is required. |
|
| 2.6 -> 2.6.3 | iOS 7 | OS X 10.9 | watchOS 2.0 | n/a | Xcode 7+ is required. |
|
||||||
@ -91,7 +89,7 @@ Run `carthage` to build the framework and drag the built `AFNetworking.framework
|
|||||||
| 1.x | iOS 5 | Mac OS X 10.7 | n/a | n/a |
|
| 1.x | iOS 5 | Mac OS X 10.7 | n/a | n/a |
|
||||||
| 0.10.x | iOS 4 | Mac OS X 10.6 | n/a | n/a |
|
| 0.10.x | iOS 4 | Mac OS X 10.6 | n/a | n/a |
|
||||||
|
|
||||||
(macOS projects must support [64-bit with modern Cocoa runtime](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html)).
|
(OS X projects must support [64-bit with modern Cocoa runtime](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html)).
|
||||||
|
|
||||||
> Programming in Swift? Try [Alamofire](https://github.com/Alamofire/Alamofire) for a more conventional set of APIs.
|
> Programming in Swift? Try [Alamofire](https://github.com/Alamofire/Alamofire) for a more conventional set of APIs.
|
||||||
|
|
||||||
@ -112,7 +110,7 @@ Run `carthage` to build the framework and drag the built `AFNetworking.framework
|
|||||||
- `AFHTTPResponseSerializer`
|
- `AFHTTPResponseSerializer`
|
||||||
- `AFJSONResponseSerializer`
|
- `AFJSONResponseSerializer`
|
||||||
- `AFXMLParserResponseSerializer`
|
- `AFXMLParserResponseSerializer`
|
||||||
- `AFXMLDocumentResponseSerializer` _(macOS)_
|
- `AFXMLDocumentResponseSerializer` _(Mac OS X)_
|
||||||
- `AFPropertyListResponseSerializer`
|
- `AFPropertyListResponseSerializer`
|
||||||
- `AFImageResponseSerializer`
|
- `AFImageResponseSerializer`
|
||||||
- `AFCompoundResponseSerializer`
|
- `AFCompoundResponseSerializer`
|
||||||
@ -319,4 +317,4 @@ If you believe you have identified a security vulnerability with AFNetworking, y
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
AFNetworking is released under the MIT license. See [LICENSE](https://github.com/AFNetworking/AFNetworking/blob/master/LICENSE) for details.
|
AFNetworking is released under the MIT license. See LICENSE for details.
|
||||||
|
|||||||
@ -72,17 +72,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
*/
|
*/
|
||||||
@protocol AFImageRequestCache <AFImageCache>
|
@protocol AFImageRequestCache <AFImageCache>
|
||||||
|
|
||||||
/**
|
|
||||||
Asks if the image should be cached using an identifier created from the request and additional identifier.
|
|
||||||
|
|
||||||
@param image The image to be cached.
|
|
||||||
@param request The unique URL request identifing the image asset.
|
|
||||||
@param identifier The additional identifier to apply to the URL request to identify the image.
|
|
||||||
|
|
||||||
@return A BOOL indicating whether or not the image should be added to the cache. YES will cache, NO will prevent caching.
|
|
||||||
*/
|
|
||||||
- (BOOL)shouldCacheImage:(UIImage *)image forRequest:(NSURLRequest *)request withAdditionalIdentifier:(nullable NSString *)identifier;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Adds the image to the cache using an identifier created from the request and additional identifier.
|
Adds the image to the cache using an identifier created from the request and additional identifier.
|
||||||
|
|
||||||
|
|||||||
@ -196,10 +196,6 @@
|
|||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)shouldCacheImage:(UIImage *)image forRequest:(NSURLRequest *)request withAdditionalIdentifier:(nullable NSString *)identifier {
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -81,11 +81,6 @@ typedef NS_ENUM(NSInteger, AFImageDownloadPrioritization) {
|
|||||||
*/
|
*/
|
||||||
+ (NSURLCache *)defaultURLCache;
|
+ (NSURLCache *)defaultURLCache;
|
||||||
|
|
||||||
/**
|
|
||||||
The default `NSURLSessionConfiguration` with common usage parameter values.
|
|
||||||
*/
|
|
||||||
+ (NSURLSessionConfiguration *)defaultURLSessionConfiguration;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Default initializer
|
Default initializer
|
||||||
|
|
||||||
@ -93,15 +88,6 @@ typedef NS_ENUM(NSInteger, AFImageDownloadPrioritization) {
|
|||||||
*/
|
*/
|
||||||
- (instancetype)init;
|
- (instancetype)init;
|
||||||
|
|
||||||
/**
|
|
||||||
Initializer with specific `URLSessionConfiguration`
|
|
||||||
|
|
||||||
@param configuration The `NSURLSessionConfiguration` to be be used
|
|
||||||
|
|
||||||
@return An instance of `AFImageDownloader` initialized with default values and custom `NSURLSessionConfiguration`
|
|
||||||
*/
|
|
||||||
- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Initializes the `AFImageDownloader` instance with the given session manager, download prioritization, maximum active download count and image cache.
|
Initializes the `AFImageDownloader` instance with the given session manager, download prioritization, maximum active download count and image cache.
|
||||||
|
|
||||||
|
|||||||
@ -106,20 +106,10 @@
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
@implementation AFImageDownloader
|
@implementation AFImageDownloader
|
||||||
|
|
||||||
+ (NSURLCache *)defaultURLCache {
|
+ (NSURLCache *)defaultURLCache {
|
||||||
|
|
||||||
// It's been discovered that a crash will occur on certain versions
|
|
||||||
// of iOS if you customize the cache.
|
|
||||||
//
|
|
||||||
// More info can be found here: https://devforums.apple.com/message/1102182#1102182
|
|
||||||
//
|
|
||||||
// When iOS 7 support is dropped, this should be modified to use
|
|
||||||
// NSProcessInfo methods instead.
|
|
||||||
if ([[[UIDevice currentDevice] systemVersion] compare:@"8.2" options:NSNumericSearch] == NSOrderedAscending) {
|
|
||||||
return [NSURLCache sharedURLCache];
|
|
||||||
}
|
|
||||||
return [[NSURLCache alloc] initWithMemoryCapacity:20 * 1024 * 1024
|
return [[NSURLCache alloc] initWithMemoryCapacity:20 * 1024 * 1024
|
||||||
diskCapacity:150 * 1024 * 1024
|
diskCapacity:150 * 1024 * 1024
|
||||||
diskPath:@"com.alamofire.imagedownloader"];
|
diskPath:@"com.alamofire.imagedownloader"];
|
||||||
@ -143,11 +133,7 @@
|
|||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
NSURLSessionConfiguration *defaultConfiguration = [self.class defaultURLSessionConfiguration];
|
NSURLSessionConfiguration *defaultConfiguration = [self.class defaultURLSessionConfiguration];
|
||||||
return [self initWithSessionConfiguration:defaultConfiguration];
|
AFHTTPSessionManager *sessionManager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:defaultConfiguration];
|
||||||
}
|
|
||||||
|
|
||||||
- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration {
|
|
||||||
AFHTTPSessionManager *sessionManager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:configuration];
|
|
||||||
sessionManager.responseSerializer = [AFImageResponseSerializer serializer];
|
sessionManager.responseSerializer = [AFImageResponseSerializer serializer];
|
||||||
|
|
||||||
return [self initWithSessionManager:sessionManager
|
return [self initWithSessionManager:sessionManager
|
||||||
@ -249,12 +235,10 @@
|
|||||||
|
|
||||||
createdTask = [self.sessionManager
|
createdTask = [self.sessionManager
|
||||||
dataTaskWithRequest:request
|
dataTaskWithRequest:request
|
||||||
uploadProgress:nil
|
|
||||||
downloadProgress:nil
|
|
||||||
completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
|
completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
|
||||||
dispatch_async(self.responseQueue, ^{
|
dispatch_async(self.responseQueue, ^{
|
||||||
__strong __typeof__(weakSelf) strongSelf = weakSelf;
|
__strong __typeof__(weakSelf) strongSelf = weakSelf;
|
||||||
AFImageDownloaderMergedTask *mergedTask = strongSelf.mergedTasks[URLIdentifier];
|
AFImageDownloaderMergedTask *mergedTask = self.mergedTasks[URLIdentifier];
|
||||||
if ([mergedTask.identifier isEqual:mergedTaskIdentifier]) {
|
if ([mergedTask.identifier isEqual:mergedTaskIdentifier]) {
|
||||||
mergedTask = [strongSelf safelyRemoveMergedTaskWithURLIdentifier:URLIdentifier];
|
mergedTask = [strongSelf safelyRemoveMergedTaskWithURLIdentifier:URLIdentifier];
|
||||||
if (error) {
|
if (error) {
|
||||||
@ -266,9 +250,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ([strongSelf.imageCache shouldCacheImage:responseObject forRequest:request withAdditionalIdentifier:nil]) {
|
[strongSelf.imageCache addImage:responseObject forRequest:request withAdditionalIdentifier:nil];
|
||||||
[strongSelf.imageCache addImage:responseObject forRequest:request withAdditionalIdentifier:nil];
|
|
||||||
}
|
|
||||||
|
|
||||||
for (AFImageDownloaderResponseHandler *handler in mergedTask.responseHandlers) {
|
for (AFImageDownloaderResponseHandler *handler in mergedTask.responseHandlers) {
|
||||||
if (handler.successBlock) {
|
if (handler.successBlock) {
|
||||||
|
|||||||
@ -147,7 +147,10 @@ typedef void (^AFNetworkActivityActionBlock)(BOOL networkActivityIndicatorVisibl
|
|||||||
- (void)decrementActivityCount {
|
- (void)decrementActivityCount {
|
||||||
[self willChangeValueForKey:@"activityCount"];
|
[self willChangeValueForKey:@"activityCount"];
|
||||||
@synchronized(self) {
|
@synchronized(self) {
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wgnu"
|
||||||
_activityCount = MAX(_activityCount - 1, 0);
|
_activityCount = MAX(_activityCount - 1, 0);
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
[self didChangeValueForKey:@"activityCount"];
|
[self didChangeValueForKey:@"activityCount"];
|
||||||
|
|
||||||
@ -191,9 +194,8 @@ typedef void (^AFNetworkActivityActionBlock)(BOOL networkActivityIndicatorVisibl
|
|||||||
[self startCompletionDelayTimer];
|
[self startCompletionDelayTimer];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
[self didChangeValueForKey:@"currentState"];
|
|
||||||
}
|
}
|
||||||
|
[self didChangeValueForKey:@"currentState"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -71,12 +71,16 @@
|
|||||||
|
|
||||||
if (task) {
|
if (task) {
|
||||||
if (task.state != NSURLSessionTaskStateCompleted) {
|
if (task.state != NSURLSessionTaskStateCompleted) {
|
||||||
UIActivityIndicatorView *activityIndicatorView = self.activityIndicatorView;
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wreceiver-is-weak"
|
||||||
|
#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak"
|
||||||
if (task.state == NSURLSessionTaskStateRunning) {
|
if (task.state == NSURLSessionTaskStateRunning) {
|
||||||
[activityIndicatorView startAnimating];
|
[self.activityIndicatorView startAnimating];
|
||||||
} else {
|
} else {
|
||||||
[activityIndicatorView stopAnimating];
|
[self.activityIndicatorView stopAnimating];
|
||||||
}
|
}
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
[notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingTaskDidResumeNotification object:task];
|
[notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingTaskDidResumeNotification object:task];
|
||||||
[notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidCompleteNotification object:task];
|
[notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidCompleteNotification object:task];
|
||||||
@ -89,13 +93,19 @@
|
|||||||
|
|
||||||
- (void)af_startAnimating {
|
- (void)af_startAnimating {
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wreceiver-is-weak"
|
||||||
[self.activityIndicatorView startAnimating];
|
[self.activityIndicatorView startAnimating];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)af_stopAnimating {
|
- (void)af_stopAnimating {
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wreceiver-is-weak"
|
||||||
[self.activityIndicatorView stopAnimating];
|
[self.activityIndicatorView stopAnimating];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -103,7 +103,10 @@ static const char * af_backgroundImageDownloadReceiptKeyForState(UIControlState
|
|||||||
|
|
||||||
+ (AFImageDownloader *)sharedImageDownloader {
|
+ (AFImageDownloader *)sharedImageDownloader {
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wgnu"
|
||||||
return objc_getAssociatedObject(self, @selector(sharedImageDownloader)) ?: [AFImageDownloader defaultInstance];
|
return objc_getAssociatedObject(self, @selector(sharedImageDownloader)) ?: [AFImageDownloader defaultInstance];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader {
|
+ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader {
|
||||||
|
|||||||
@ -48,7 +48,11 @@
|
|||||||
@implementation UIImageView (AFNetworking)
|
@implementation UIImageView (AFNetworking)
|
||||||
|
|
||||||
+ (AFImageDownloader *)sharedImageDownloader {
|
+ (AFImageDownloader *)sharedImageDownloader {
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wgnu"
|
||||||
return objc_getAssociatedObject(self, @selector(sharedImageDownloader)) ?: [AFImageDownloader defaultInstance];
|
return objc_getAssociatedObject(self, @selector(sharedImageDownloader)) ?: [AFImageDownloader defaultInstance];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader {
|
+ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader {
|
||||||
|
|||||||
@ -55,10 +55,6 @@ static void * AFTaskCountOfBytesReceivedContext = &AFTaskCountOfBytesReceivedCon
|
|||||||
- (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task
|
- (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task
|
||||||
animated:(BOOL)animated
|
animated:(BOOL)animated
|
||||||
{
|
{
|
||||||
if (task.state == NSURLSessionTaskStateCompleted) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[task addObserver:self forKeyPath:@"state" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesSentContext];
|
[task addObserver:self forKeyPath:@"state" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesSentContext];
|
||||||
[task addObserver:self forKeyPath:@"countOfBytesSent" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesSentContext];
|
[task addObserver:self forKeyPath:@"countOfBytesSent" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesSentContext];
|
||||||
|
|
||||||
@ -68,10 +64,6 @@ static void * AFTaskCountOfBytesReceivedContext = &AFTaskCountOfBytesReceivedCon
|
|||||||
- (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task
|
- (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task
|
||||||
animated:(BOOL)animated
|
animated:(BOOL)animated
|
||||||
{
|
{
|
||||||
if (task.state == NSURLSessionTaskStateCompleted) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[task addObserver:self forKeyPath:@"state" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext];
|
[task addObserver:self forKeyPath:@"state" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext];
|
||||||
[task addObserver:self forKeyPath:@"countOfBytesReceived" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext];
|
[task addObserver:self forKeyPath:@"countOfBytesReceived" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext];
|
||||||
|
|
||||||
|
|||||||
@ -71,16 +71,19 @@
|
|||||||
[notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil];
|
[notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil];
|
||||||
|
|
||||||
if (task) {
|
if (task) {
|
||||||
UIRefreshControl *refreshControl = self.refreshControl;
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wreceiver-is-weak"
|
||||||
|
#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak"
|
||||||
if (task.state == NSURLSessionTaskStateRunning) {
|
if (task.state == NSURLSessionTaskStateRunning) {
|
||||||
[refreshControl beginRefreshing];
|
[self.refreshControl beginRefreshing];
|
||||||
|
|
||||||
[notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingTaskDidResumeNotification object:task];
|
[notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingTaskDidResumeNotification object:task];
|
||||||
[notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidCompleteNotification object:task];
|
[notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidCompleteNotification object:task];
|
||||||
[notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidSuspendNotification object:task];
|
[notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidSuspendNotification object:task];
|
||||||
} else {
|
} else {
|
||||||
[refreshControl endRefreshing];
|
[self.refreshControl endRefreshing];
|
||||||
}
|
}
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,13 +91,19 @@
|
|||||||
|
|
||||||
- (void)af_beginRefreshing {
|
- (void)af_beginRefreshing {
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wreceiver-is-weak"
|
||||||
[self.refreshControl beginRefreshing];
|
[self.refreshControl beginRefreshing];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)af_endRefreshing {
|
- (void)af_endRefreshing {
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wreceiver-is-weak"
|
||||||
[self.refreshControl endRefreshing];
|
[self.refreshControl endRefreshing];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,10 @@
|
|||||||
_af_defaultHTTPSessionManager.responseSerializer = [AFHTTPResponseSerializer serializer];
|
_af_defaultHTTPSessionManager.responseSerializer = [AFHTTPResponseSerializer serializer];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wgnu"
|
||||||
return objc_getAssociatedObject(self, @selector(sessionManager)) ?: _af_defaultHTTPSessionManager;
|
return objc_getAssociatedObject(self, @selector(sessionManager)) ?: _af_defaultHTTPSessionManager;
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setSessionManager:(AFHTTPSessionManager *)sessionManager {
|
- (void)setSessionManager:(AFHTTPSessionManager *)sessionManager {
|
||||||
@ -72,7 +75,10 @@
|
|||||||
_af_defaultResponseSerializer = [AFHTTPResponseSerializer serializer];
|
_af_defaultResponseSerializer = [AFHTTPResponseSerializer serializer];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wgnu"
|
||||||
return objc_getAssociatedObject(self, @selector(responseSerializer)) ?: _af_defaultResponseSerializer;
|
return objc_getAssociatedObject(self, @selector(responseSerializer)) ?: _af_defaultResponseSerializer;
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setResponseSerializer:(AFHTTPResponseSerializer<AFURLResponseSerialization> *)responseSerializer {
|
- (void)setResponseSerializer:(AFHTTPResponseSerializer<AFURLResponseSerialization> *)responseSerializer {
|
||||||
@ -119,28 +125,27 @@
|
|||||||
self.af_URLSessionTask = nil;
|
self.af_URLSessionTask = nil;
|
||||||
|
|
||||||
__weak __typeof(self)weakSelf = self;
|
__weak __typeof(self)weakSelf = self;
|
||||||
__block NSURLSessionDataTask *dataTask;
|
NSURLSessionDataTask *dataTask;
|
||||||
dataTask = [self.sessionManager
|
dataTask = [self.sessionManager
|
||||||
dataTaskWithRequest:request
|
GET:request.URL.absoluteString
|
||||||
uploadProgress:nil
|
parameters:nil
|
||||||
downloadProgress:nil
|
progress:nil
|
||||||
completionHandler:^(NSURLResponse * _Nonnull response, id _Nonnull responseObject, NSError * _Nullable error) {
|
success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) {
|
||||||
__strong __typeof(weakSelf) strongSelf = weakSelf;
|
__strong __typeof(weakSelf) strongSelf = weakSelf;
|
||||||
if (error) {
|
if (success) {
|
||||||
if (failure) {
|
success((NSHTTPURLResponse *)task.response, responseObject);
|
||||||
failure(error);
|
}
|
||||||
}
|
[strongSelf loadData:responseObject MIMEType:MIMEType textEncodingName:textEncodingName baseURL:[task.currentRequest URL]];
|
||||||
} else {
|
|
||||||
if (success) {
|
|
||||||
success((NSHTTPURLResponse *)response, responseObject);
|
|
||||||
}
|
|
||||||
[strongSelf loadData:responseObject MIMEType:MIMEType textEncodingName:textEncodingName baseURL:[dataTask.currentRequest URL]];
|
|
||||||
|
|
||||||
if ([strongSelf.delegate respondsToSelector:@selector(webViewDidFinishLoad:)]) {
|
if ([strongSelf.delegate respondsToSelector:@selector(webViewDidStartLoad:)]) {
|
||||||
[strongSelf.delegate webViewDidFinishLoad:strongSelf];
|
[strongSelf.delegate webViewDidFinishLoad:strongSelf];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}];
|
failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
|
||||||
|
if (failure) {
|
||||||
|
failure(error);
|
||||||
|
}
|
||||||
|
}];
|
||||||
self.af_URLSessionTask = dataTask;
|
self.af_URLSessionTask = dataTask;
|
||||||
if (progress != nil) {
|
if (progress != nil) {
|
||||||
*progress = [self.sessionManager downloadProgressForTask:dataTask];
|
*progress = [self.sessionManager downloadProgressForTask:dataTask];
|
||||||
|
|||||||
@ -220,14 +220,13 @@ static NSString *g_overrideAppID = nil;
|
|||||||
|
|
||||||
@property (nonatomic, copy) NSString *pushNotificationsDeviceTokenString;
|
@property (nonatomic, copy) NSString *pushNotificationsDeviceTokenString;
|
||||||
|
|
||||||
@property (nonatomic, strong) dispatch_source_t flushTimer;
|
|
||||||
@property (nonatomic, strong) dispatch_source_t attributionIDRecheckTimer;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation FBSDKAppEvents
|
@implementation FBSDKAppEvents
|
||||||
{
|
{
|
||||||
BOOL _explicitEventsLoggedYet;
|
BOOL _explicitEventsLoggedYet;
|
||||||
|
NSTimer *_flushTimer;
|
||||||
|
NSTimer *_attributionIDRecheckTimer;
|
||||||
FBSDKServerConfiguration *_serverConfiguration;
|
FBSDKServerConfiguration *_serverConfiguration;
|
||||||
FBSDKAppEventsState *_appEventsState;
|
FBSDKAppEventsState *_appEventsState;
|
||||||
NSString *_userID;
|
NSString *_userID;
|
||||||
@ -247,18 +246,18 @@ static NSString *g_overrideAppID = nil;
|
|||||||
self = [super init];
|
self = [super init];
|
||||||
if (self) {
|
if (self) {
|
||||||
_flushBehavior = FBSDKAppEventsFlushBehaviorAuto;
|
_flushBehavior = FBSDKAppEventsFlushBehaviorAuto;
|
||||||
|
_flushTimer = [NSTimer timerWithTimeInterval:FLUSH_PERIOD_IN_SECONDS
|
||||||
typeof(self) __weak weakSelf = self;
|
target:self
|
||||||
self.flushTimer = [FBSDKUtility startGCDTimerWithInterval:FLUSH_PERIOD_IN_SECONDS
|
selector:@selector(flushTimerFired:)
|
||||||
block:^{
|
userInfo:nil
|
||||||
[weakSelf flushTimerFired:nil];
|
repeats:YES];
|
||||||
}];
|
_attributionIDRecheckTimer = [NSTimer timerWithTimeInterval:APP_SUPPORTS_ATTRIBUTION_ID_RECHECK_PERIOD
|
||||||
|
target:self
|
||||||
self.attributionIDRecheckTimer = [FBSDKUtility startGCDTimerWithInterval:APP_SUPPORTS_ATTRIBUTION_ID_RECHECK_PERIOD
|
selector:@selector(appSettingsFetchStateResetTimerFired:)
|
||||||
block:^{
|
userInfo:nil
|
||||||
[weakSelf appSettingsFetchStateResetTimerFired:nil];
|
repeats:YES];
|
||||||
}];
|
[[NSRunLoop mainRunLoop] addTimer:_flushTimer forMode:NSDefaultRunLoopMode];
|
||||||
|
[[NSRunLoop mainRunLoop] addTimer:_attributionIDRecheckTimer forMode:NSDefaultRunLoopMode];
|
||||||
[[NSNotificationCenter defaultCenter]
|
[[NSNotificationCenter defaultCenter]
|
||||||
addObserver:self
|
addObserver:self
|
||||||
selector:@selector(applicationMovingFromActiveStateOrTerminating)
|
selector:@selector(applicationMovingFromActiveStateOrTerminating)
|
||||||
@ -287,8 +286,10 @@ static NSString *g_overrideAppID = nil;
|
|||||||
- (void)dealloc
|
- (void)dealloc
|
||||||
{
|
{
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||||
[FBSDKUtility stopGCDTimer:self.flushTimer];
|
// technically these timers retain self so there's a cycle but
|
||||||
[FBSDKUtility stopGCDTimer:self.attributionIDRecheckTimer];
|
// we're a singleton anyway.
|
||||||
|
[_flushTimer invalidate];
|
||||||
|
[_attributionIDRecheckTimer invalidate];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Public Methods
|
#pragma mark - Public Methods
|
||||||
@ -789,7 +790,8 @@ static NSString *g_overrideAppID = nil;
|
|||||||
|
|
||||||
[self fetchServerConfiguration:^(void) {
|
[self fetchServerConfiguration:^(void) {
|
||||||
NSString *receipt_data = [appEventsState extractReceiptData];
|
NSString *receipt_data = [appEventsState extractReceiptData];
|
||||||
NSString *encodedEvents = [appEventsState JSONStringForEvents:_serverConfiguration.implicitLoggingEnabled];
|
NSString *JSONString = [appEventsState JSONStringForEvents:_serverConfiguration.implicitLoggingEnabled];
|
||||||
|
NSData *encodedEvents = [JSONString dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
if (!encodedEvents) {
|
if (!encodedEvents) {
|
||||||
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents
|
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents
|
||||||
logEntry:@"FBSDKAppEvents: Flushing skipped - no events after removing implicitly logged ones.\n"];
|
logEntry:@"FBSDKAppEvents: Flushing skipped - no events after removing implicitly logged ones.\n"];
|
||||||
@ -804,7 +806,7 @@ static NSString *g_overrideAppID = nil;
|
|||||||
postParameters[@"receipt_data"] = receipt_data;
|
postParameters[@"receipt_data"] = receipt_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
postParameters[@"custom_events"] = encodedEvents;
|
postParameters[@"custom_events_file"] = encodedEvents;
|
||||||
if (appEventsState.numSkipped > 0) {
|
if (appEventsState.numSkipped > 0) {
|
||||||
postParameters[@"num_skipped_events"] = [NSString stringWithFormat:@"%lu", (unsigned long)appEventsState.numSkipped];
|
postParameters[@"num_skipped_events"] = [NSString stringWithFormat:@"%lu", (unsigned long)appEventsState.numSkipped];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,7 +55,9 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
|||||||
FBSDKBridgeAPIRequest *_pendingRequest;
|
FBSDKBridgeAPIRequest *_pendingRequest;
|
||||||
FBSDKBridgeAPICallbackBlock _pendingRequestCompletionBlock;
|
FBSDKBridgeAPICallbackBlock _pendingRequestCompletionBlock;
|
||||||
id<FBSDKURLOpening> _pendingURLOpen;
|
id<FBSDKURLOpening> _pendingURLOpen;
|
||||||
|
#ifdef __IPHONE_11_0
|
||||||
SFAuthenticationSession *_authenticationSession NS_AVAILABLE_IOS(11_0);
|
SFAuthenticationSession *_authenticationSession NS_AVAILABLE_IOS(11_0);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
BOOL _expectingBackground;
|
BOOL _expectingBackground;
|
||||||
UIViewController *_safariViewController;
|
UIViewController *_safariViewController;
|
||||||
@ -170,12 +172,12 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
|||||||
completion:completePendingOpenURLBlock];
|
completion:completePendingOpenURLBlock];
|
||||||
_safariViewController = nil;
|
_safariViewController = nil;
|
||||||
} else {
|
} else {
|
||||||
if (@available(iOS 11.0, *)) {
|
#ifdef __IPHONE_11_0
|
||||||
if (_authenticationSession != nil) {
|
if (_authenticationSession != nil) {
|
||||||
[_authenticationSession cancel];
|
[_authenticationSession cancel];
|
||||||
_authenticationSession = nil;
|
_authenticationSession = nil;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
completePendingOpenURLBlock();
|
completePendingOpenURLBlock();
|
||||||
}
|
}
|
||||||
if ([pendingURLOpen canOpenURL:url
|
if ([pendingURLOpen canOpenURL:url
|
||||||
@ -241,9 +243,9 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
|||||||
// might have been a "didBecomeActive" event pending that we want to ignore.
|
// might have been a "didBecomeActive" event pending that we want to ignore.
|
||||||
BOOL notExpectingBackground = !_expectingBackground && !_safariViewController && !_isDismissingSafariViewController;
|
BOOL notExpectingBackground = !_expectingBackground && !_safariViewController && !_isDismissingSafariViewController;
|
||||||
#if !TARGET_OS_TV
|
#if !TARGET_OS_TV
|
||||||
if (@available(iOS 11.0, *)) {
|
#ifdef __IPHONE_11_0
|
||||||
notExpectingBackground = notExpectingBackground && !_authenticationSession;
|
notExpectingBackground = notExpectingBackground && !_authenticationSession;
|
||||||
}
|
#endif
|
||||||
#endif
|
#endif
|
||||||
if (notExpectingBackground) {
|
if (notExpectingBackground) {
|
||||||
_active = YES;
|
_active = YES;
|
||||||
@ -345,22 +347,22 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
|||||||
_expectingBackground = NO;
|
_expectingBackground = NO;
|
||||||
_pendingURLOpen = sender;
|
_pendingURLOpen = sender;
|
||||||
|
|
||||||
if (@available(iOS 11.0, *)) {
|
#ifdef __IPHONE_11_0
|
||||||
if ([sender isAuthenticationURL:url]) {
|
if ([sender isAuthenticationURL:url]) {
|
||||||
Class SFAuthenticationSessionClass = fbsdkdfl_SFAuthenticationSessionClass();
|
Class SFAuthenticationSessionClass = fbsdkdfl_SFAuthenticationSessionClass();
|
||||||
if (SFAuthenticationSessionClass != nil) {
|
if (SFAuthenticationSessionClass != nil) {
|
||||||
_authenticationSession = [[SFAuthenticationSessionClass alloc] initWithURL:url callbackURLScheme:[FBSDKInternalUtility appURLScheme] completionHandler:^ (NSURL *aURL, NSError *error) {
|
_authenticationSession = [[SFAuthenticationSessionClass alloc] initWithURL:url callbackURLScheme:[FBSDKInternalUtility appURLScheme] completionHandler:^ (NSURL *aURL, NSError *error) {
|
||||||
handler(error == nil, error);
|
handler(error == nil, error);
|
||||||
if (error == nil) {
|
if (error == nil) {
|
||||||
[self application:[UIApplication sharedApplication] openURL:aURL sourceApplication:@"com.apple" annotation:nil];
|
[self application:[UIApplication sharedApplication] openURL:aURL sourceApplication:@"com.apple" annotation:nil];
|
||||||
}
|
}
|
||||||
_authenticationSession = nil;
|
_authenticationSession = nil;
|
||||||
}];
|
}];
|
||||||
[_authenticationSession start];
|
[_authenticationSession start];
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// trying to dynamically load SFSafariViewController class
|
// trying to dynamically load SFSafariViewController class
|
||||||
// so for the cases when it is available we can send users through Safari View Controller flow
|
// so for the cases when it is available we can send users through Safari View Controller flow
|
||||||
|
|||||||
@ -44,5 +44,5 @@
|
|||||||
#import <FBSDKCoreKit/FBSDKDeviceViewControllerBase.h>
|
#import <FBSDKCoreKit/FBSDKDeviceViewControllerBase.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FBSDK_VERSION_STRING @"4.31.1"
|
#define FBSDK_VERSION_STRING @"4.29.0"
|
||||||
#define FBSDK_TARGET_PLATFORM_VERSION @"v2.11"
|
#define FBSDK_TARGET_PLATFORM_VERSION @"v2.11"
|
||||||
|
|||||||
@ -30,7 +30,6 @@
|
|||||||
|
|
||||||
// constants
|
// constants
|
||||||
static NSString *const kGetHTTPMethod = @"GET";
|
static NSString *const kGetHTTPMethod = @"GET";
|
||||||
static NSString *const kPostHTTPMethod = @"POST";
|
|
||||||
|
|
||||||
@interface FBSDKGraphRequest()
|
@interface FBSDKGraphRequest()
|
||||||
@property (nonatomic, assign) FBSDKGraphRequestFlags flags;
|
@property (nonatomic, assign) FBSDKGraphRequestFlags flags;
|
||||||
@ -145,23 +144,12 @@ static NSString *const kPostHTTPMethod = @"POST";
|
|||||||
+ (NSString *)serializeURL:(NSString *)baseUrl
|
+ (NSString *)serializeURL:(NSString *)baseUrl
|
||||||
params:(NSDictionary *)params
|
params:(NSDictionary *)params
|
||||||
httpMethod:(NSString *)httpMethod {
|
httpMethod:(NSString *)httpMethod {
|
||||||
return [self serializeURL:baseUrl params:params httpMethod:httpMethod forBatch:NO];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (NSString *)serializeURL:(NSString *)baseUrl
|
|
||||||
params:(NSDictionary *)params
|
|
||||||
httpMethod:(NSString *)httpMethod
|
|
||||||
forBatch:(BOOL)forBatch {
|
|
||||||
params = [self preprocessParams: params];
|
params = [self preprocessParams: params];
|
||||||
|
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
NSURL *parsedURL = [NSURL URLWithString:[baseUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
|
NSURL *parsedURL = [NSURL URLWithString:[baseUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
|
||||||
#pragma clang pop
|
#pragma clang pop
|
||||||
if ([httpMethod isEqualToString:kPostHTTPMethod] && !forBatch) {
|
|
||||||
return baseUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
NSString *queryPrefix = parsedURL.query ? @"&" : @"?";
|
NSString *queryPrefix = parsedURL.query ? @"&" : @"?";
|
||||||
|
|
||||||
NSString *query = [FBSDKInternalUtility queryStringWithDictionary:params error:NULL invalidObjectHandler:^id(id object, BOOL *stop) {
|
NSString *query = [FBSDKInternalUtility queryStringWithDictionary:params error:NULL invalidObjectHandler:^id(id object, BOOL *stop) {
|
||||||
|
|||||||
@ -443,7 +443,7 @@ NSURLSessionDataDelegate
|
|||||||
NSUInteger bodyLength = [[body data] length] / 1024;
|
NSUInteger bodyLength = [[body data] length] / 1024;
|
||||||
|
|
||||||
[request setValue:[FBSDKGraphRequestConnection userAgent] forHTTPHeaderField:@"User-Agent"];
|
[request setValue:[FBSDKGraphRequestConnection userAgent] forHTTPHeaderField:@"User-Agent"];
|
||||||
[request setValue:[body mimeContentType] forHTTPHeaderField:@"Content-Type"];
|
[request setValue:[FBSDKGraphRequestBody mimeContentType] forHTTPHeaderField:@"Content-Type"];
|
||||||
[request setHTTPShouldHandleCookies:NO];
|
[request setHTTPShouldHandleCookies:NO];
|
||||||
|
|
||||||
[self logRequest:request bodyLength:bodyLength bodyLogger:bodyLogger attachmentLogger:attachmentLogger];
|
[self logRequest:request bodyLength:bodyLength bodyLogger:bodyLogger attachmentLogger:attachmentLogger];
|
||||||
@ -495,8 +495,7 @@ NSURLSessionDataDelegate
|
|||||||
|
|
||||||
NSString *url = [FBSDKGraphRequest serializeURL:baseURL
|
NSString *url = [FBSDKGraphRequest serializeURL:baseURL
|
||||||
params:request.parameters
|
params:request.parameters
|
||||||
httpMethod:request.HTTPMethod
|
httpMethod:request.HTTPMethod];
|
||||||
forBatch:forBatch];
|
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -52,18 +52,4 @@
|
|||||||
*/
|
*/
|
||||||
+ (NSString *)URLEncode:(NSString *)value;
|
+ (NSString *)URLEncode:(NSString *)value;
|
||||||
|
|
||||||
/**
|
|
||||||
Creates a timer using Grand Central Dispatch.
|
|
||||||
- Parameter interval: The interval to fire the timer, in seconds.
|
|
||||||
- Parameter block: The code block to execute when timer is fired.
|
|
||||||
- Returns: The dispatch handle.
|
|
||||||
*/
|
|
||||||
+ (dispatch_source_t)startGCDTimerWithInterval:(double)interval block:(dispatch_block_t)block;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Stop a timer that was started by startGCDTimerWithInterval.
|
|
||||||
- Parameter timer: The dispatch handle received from startGCDTimerWithInterval.
|
|
||||||
*/
|
|
||||||
+ (void)stopGCDTimer:(dispatch_source_t)timer;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -81,32 +81,6 @@
|
|||||||
}
|
}
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
+ (dispatch_source_t)startGCDTimerWithInterval:(double)interval block:(dispatch_block_t)block
|
|
||||||
{
|
|
||||||
dispatch_source_t timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, // source type
|
|
||||||
0, // handle
|
|
||||||
0, // mask
|
|
||||||
dispatch_get_main_queue()); // queue
|
|
||||||
|
|
||||||
dispatch_source_set_timer(timer, // dispatch source
|
|
||||||
dispatch_time(DISPATCH_TIME_NOW, interval * NSEC_PER_SEC), // start
|
|
||||||
interval * NSEC_PER_SEC, // interval
|
|
||||||
0 * NSEC_PER_SEC); // leeway
|
|
||||||
|
|
||||||
dispatch_source_set_event_handler(timer, block);
|
|
||||||
|
|
||||||
dispatch_resume(timer);
|
|
||||||
|
|
||||||
return timer;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void)stopGCDTimer:(dispatch_source_t)timer
|
|
||||||
{
|
|
||||||
if (timer) {
|
|
||||||
dispatch_source_cancel(timer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (instancetype)init
|
- (instancetype)init
|
||||||
{
|
{
|
||||||
FBSDK_NO_DESIGNATED_INITIALIZER();
|
FBSDK_NO_DESIGNATED_INITIALIZER();
|
||||||
|
|||||||
@ -714,7 +714,11 @@ static NSMapTable *_transientObjects;
|
|||||||
|
|
||||||
if (![self isRegisteredCanOpenURLScheme:urlScheme]){
|
if (![self isRegisteredCanOpenURLScheme:urlScheme]){
|
||||||
NSString *reason = [NSString stringWithFormat:@"%@ is missing from your Info.plist under LSApplicationQueriesSchemes and is required for iOS 9.0", urlScheme];
|
NSString *reason = [NSString stringWithFormat:@"%@ is missing from your Info.plist under LSApplicationQueriesSchemes and is required for iOS 9.0", urlScheme];
|
||||||
|
#ifdef __IPHONE_9_0
|
||||||
|
@throw [NSException exceptionWithName:@"InvalidOperationException" reason:reason userInfo:nil];
|
||||||
|
#else
|
||||||
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors logEntry:reason];
|
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors logEntry:reason];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKGraphRequestFlags)
|
|||||||
+ (BOOL)isAttachment:(id)item;
|
+ (BOOL)isAttachment:(id)item;
|
||||||
+ (NSString *)serializeURL:(NSString *)baseUrl
|
+ (NSString *)serializeURL:(NSString *)baseUrl
|
||||||
params:(NSDictionary *)params
|
params:(NSDictionary *)params
|
||||||
httpMethod:(NSString *)httpMethod
|
httpMethod:(NSString *)httpMethod;
|
||||||
forBatch:(BOOL)forBatch;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -42,6 +42,6 @@
|
|||||||
dataAttachmentValue:(FBSDKGraphRequestDataAttachment *)dataAttachment
|
dataAttachmentValue:(FBSDKGraphRequestDataAttachment *)dataAttachment
|
||||||
logger:(FBSDKLogger *)logger;
|
logger:(FBSDKLogger *)logger;
|
||||||
|
|
||||||
- (NSString *)mimeContentType;
|
+ (NSString *)mimeContentType;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -28,26 +28,20 @@
|
|||||||
@implementation FBSDKGraphRequestBody
|
@implementation FBSDKGraphRequestBody
|
||||||
{
|
{
|
||||||
NSMutableData *_data;
|
NSMutableData *_data;
|
||||||
NSMutableDictionary *_json;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)init
|
- (instancetype)init
|
||||||
{
|
{
|
||||||
if ((self = [super init])) {
|
if ((self = [super init])) {
|
||||||
_data = [[NSMutableData alloc] init];
|
_data = [[NSMutableData alloc] init];
|
||||||
_json = [NSMutableDictionary dictionary];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)mimeContentType
|
+ (NSString *)mimeContentType
|
||||||
{
|
{
|
||||||
if (_json) {
|
return [NSString stringWithFormat:@"multipart/form-data; boundary=%@", kStringBoundary];
|
||||||
return @"application/json";
|
|
||||||
} else {
|
|
||||||
return [NSString stringWithFormat:@"multipart/form-data; boundary=%@",kStringBoundary];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)appendUTF8:(NSString *)utf8
|
- (void)appendUTF8:(NSString *)utf8
|
||||||
@ -68,9 +62,6 @@
|
|||||||
[self _appendWithKey:key filename:nil contentType:nil contentBlock:^{
|
[self _appendWithKey:key filename:nil contentType:nil contentBlock:^{
|
||||||
[self appendUTF8:value];
|
[self appendUTF8:value];
|
||||||
}];
|
}];
|
||||||
if (key && value) {
|
|
||||||
[_json setObject:value forKey:key];
|
|
||||||
}
|
|
||||||
[logger appendFormat:@"\n %@:\t%@", key, (NSString *)value];
|
[logger appendFormat:@"\n %@:\t%@", key, (NSString *)value];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,7 +73,6 @@
|
|||||||
[self _appendWithKey:key filename:key contentType:@"image/jpeg" contentBlock:^{
|
[self _appendWithKey:key filename:key contentType:@"image/jpeg" contentBlock:^{
|
||||||
[_data appendData:data];
|
[_data appendData:data];
|
||||||
}];
|
}];
|
||||||
_json = nil;
|
|
||||||
[logger appendFormat:@"\n %@:\t<Image - %lu kB>", key, (unsigned long)([data length] / 1024)];
|
[logger appendFormat:@"\n %@:\t<Image - %lu kB>", key, (unsigned long)([data length] / 1024)];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +83,6 @@
|
|||||||
[self _appendWithKey:key filename:key contentType:@"content/unknown" contentBlock:^{
|
[self _appendWithKey:key filename:key contentType:@"content/unknown" contentBlock:^{
|
||||||
[_data appendData:data];
|
[_data appendData:data];
|
||||||
}];
|
}];
|
||||||
_json = nil;
|
|
||||||
[logger appendFormat:@"\n %@:\t<Data - %lu kB>", key, (unsigned long)([data length] / 1024)];
|
[logger appendFormat:@"\n %@:\t<Data - %lu kB>", key, (unsigned long)([data length] / 1024)];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,22 +96,11 @@
|
|||||||
[self _appendWithKey:key filename:filename contentType:contentType contentBlock:^{
|
[self _appendWithKey:key filename:filename contentType:contentType contentBlock:^{
|
||||||
[_data appendData:data];
|
[_data appendData:data];
|
||||||
}];
|
}];
|
||||||
_json = nil;
|
|
||||||
[logger appendFormat:@"\n %@:\t<Data - %lu kB>", key, (unsigned long)([data length] / 1024)];
|
[logger appendFormat:@"\n %@:\t<Data - %lu kB>", key, (unsigned long)([data length] / 1024)];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSData *)data
|
- (NSData *)data
|
||||||
{
|
{
|
||||||
if (_json) {
|
|
||||||
NSData *jsonData;
|
|
||||||
if (_json.allKeys.count > 0) {
|
|
||||||
jsonData = [NSJSONSerialization dataWithJSONObject:_json options:0 error:nil];
|
|
||||||
} else {
|
|
||||||
jsonData = [NSData data];
|
|
||||||
}
|
|
||||||
|
|
||||||
return jsonData;
|
|
||||||
}
|
|
||||||
return [_data copy];
|
return [_data copy];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationSmartLoginOptions)
|
|||||||
advertisingIDEnabled:(BOOL)advertisingIDEnabled
|
advertisingIDEnabled:(BOOL)advertisingIDEnabled
|
||||||
implicitLoggingEnabled:(BOOL)implicitLoggingEnabled
|
implicitLoggingEnabled:(BOOL)implicitLoggingEnabled
|
||||||
implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||||
appIndexingTriggerEnabled:(BOOL)appIndexingTriggerEnabled
|
|
||||||
systemAuthenticationEnabled:(BOOL)systemAuthenticationEnabled
|
systemAuthenticationEnabled:(BOOL)systemAuthenticationEnabled
|
||||||
nativeAuthFlowEnabled:(BOOL)nativeAuthFlowEnabled
|
nativeAuthFlowEnabled:(BOOL)nativeAuthFlowEnabled
|
||||||
dialogConfigurations:(NSDictionary *)dialogConfigurations
|
dialogConfigurations:(NSDictionary *)dialogConfigurations
|
||||||
@ -76,7 +75,6 @@ NS_DESIGNATED_INITIALIZER;
|
|||||||
@property (nonatomic, strong, readonly) FBSDKErrorConfiguration *errorConfiguration;
|
@property (nonatomic, strong, readonly) FBSDKErrorConfiguration *errorConfiguration;
|
||||||
@property (nonatomic, assign, readonly, getter=isImplicitLoggingSupported) BOOL implicitLoggingEnabled;
|
@property (nonatomic, assign, readonly, getter=isImplicitLoggingSupported) BOOL implicitLoggingEnabled;
|
||||||
@property (nonatomic, assign, readonly, getter=isImplicitPurchaseLoggingSupported) BOOL implicitPurchaseLoggingEnabled;
|
@property (nonatomic, assign, readonly, getter=isImplicitPurchaseLoggingSupported) BOOL implicitPurchaseLoggingEnabled;
|
||||||
@property (nonatomic, assign, readonly, getter=isAppIndexingTriggerEnabled) BOOL appIndexingTriggerEnabled;
|
|
||||||
@property (nonatomic, assign, readonly, getter=isLoginTooltipEnabled) BOOL loginTooltipEnabled;
|
@property (nonatomic, assign, readonly, getter=isLoginTooltipEnabled) BOOL loginTooltipEnabled;
|
||||||
@property (nonatomic, assign, readonly, getter=isNativeAuthFlowEnabled) BOOL nativeAuthFlowEnabled;
|
@property (nonatomic, assign, readonly, getter=isNativeAuthFlowEnabled) BOOL nativeAuthFlowEnabled;
|
||||||
@property (nonatomic, assign, readonly, getter=isSystemAuthenticationEnabled) BOOL systemAuthenticationEnabled;
|
@property (nonatomic, assign, readonly, getter=isSystemAuthenticationEnabled) BOOL systemAuthenticationEnabled;
|
||||||
|
|||||||
@ -31,7 +31,6 @@
|
|||||||
#define FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_KEY @"implicitLoggingEnabled"
|
#define FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_KEY @"implicitLoggingEnabled"
|
||||||
#define FBSDK_SERVER_CONFIGURATION_DEFAULT_SHARE_MODE_KEY @"defaultShareMode"
|
#define FBSDK_SERVER_CONFIGURATION_DEFAULT_SHARE_MODE_KEY @"defaultShareMode"
|
||||||
#define FBSDK_SERVER_CONFIGURATION_IMPLICIT_PURCHASE_LOGGING_ENABLED_KEY @"implicitPurchaseLoggingEnabled"
|
#define FBSDK_SERVER_CONFIGURATION_IMPLICIT_PURCHASE_LOGGING_ENABLED_KEY @"implicitPurchaseLoggingEnabled"
|
||||||
#define FBSDK_SERVER_CONFIGURATION_APP_INDEXING_TRIGGER_ENABLED_KEY @"appIndexingTriggerEnabled"
|
|
||||||
#define FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_ENABLED_KEY @"loginTooltipEnabled"
|
#define FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_ENABLED_KEY @"loginTooltipEnabled"
|
||||||
#define FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_TEXT_KEY @"loginTooltipText"
|
#define FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_TEXT_KEY @"loginTooltipText"
|
||||||
#define FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_ENABLED_KEY @"systemAuthenticationEnabled"
|
#define FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_ENABLED_KEY @"systemAuthenticationEnabled"
|
||||||
@ -88,7 +87,6 @@ const NSInteger FBSDKServerConfigurationVersion = 2;
|
|||||||
advertisingIDEnabled:(BOOL)advertisingIDEnabled
|
advertisingIDEnabled:(BOOL)advertisingIDEnabled
|
||||||
implicitLoggingEnabled:(BOOL)implicitLoggingEnabled
|
implicitLoggingEnabled:(BOOL)implicitLoggingEnabled
|
||||||
implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||||
appIndexingTriggerEnabled:(BOOL)appIndexingTriggerEnabled
|
|
||||||
systemAuthenticationEnabled:(BOOL)systemAuthenticationEnabled
|
systemAuthenticationEnabled:(BOOL)systemAuthenticationEnabled
|
||||||
nativeAuthFlowEnabled:(BOOL)nativeAuthFlowEnabled
|
nativeAuthFlowEnabled:(BOOL)nativeAuthFlowEnabled
|
||||||
dialogConfigurations:(NSDictionary *)dialogConfigurations
|
dialogConfigurations:(NSDictionary *)dialogConfigurations
|
||||||
@ -111,7 +109,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
|||||||
_advertisingIDEnabled = advertisingIDEnabled;
|
_advertisingIDEnabled = advertisingIDEnabled;
|
||||||
_implicitLoggingEnabled = implicitLoggingEnabled;
|
_implicitLoggingEnabled = implicitLoggingEnabled;
|
||||||
_implicitPurchaseLoggingEnabled = implicitPurchaseLoggingEnabled;
|
_implicitPurchaseLoggingEnabled = implicitPurchaseLoggingEnabled;
|
||||||
_appIndexingTriggerEnabled = appIndexingTriggerEnabled;
|
|
||||||
_systemAuthenticationEnabled = systemAuthenticationEnabled;
|
_systemAuthenticationEnabled = systemAuthenticationEnabled;
|
||||||
_nativeAuthFlowEnabled = nativeAuthFlowEnabled;
|
_nativeAuthFlowEnabled = nativeAuthFlowEnabled;
|
||||||
_dialogConfigurations = [dialogConfigurations copy];
|
_dialogConfigurations = [dialogConfigurations copy];
|
||||||
@ -180,8 +177,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
|||||||
BOOL implicitLoggingEnabled = [decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_KEY];
|
BOOL implicitLoggingEnabled = [decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_KEY];
|
||||||
BOOL implicitPurchaseLoggingEnabled =
|
BOOL implicitPurchaseLoggingEnabled =
|
||||||
[decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_PURCHASE_LOGGING_ENABLED_KEY];
|
[decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_PURCHASE_LOGGING_ENABLED_KEY];
|
||||||
BOOL appIndexingTriggerEnabled =
|
|
||||||
[decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_APP_INDEXING_TRIGGER_ENABLED_KEY];
|
|
||||||
BOOL systemAuthenticationEnabled =
|
BOOL systemAuthenticationEnabled =
|
||||||
[decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_ENABLED_KEY];
|
[decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_ENABLED_KEY];
|
||||||
FBSDKServerConfigurationSmartLoginOptions smartLoginOptions = [decoder decodeIntegerForKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_KEY];
|
FBSDKServerConfigurationSmartLoginOptions smartLoginOptions = [decoder decodeIntegerForKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_KEY];
|
||||||
@ -214,7 +209,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
|||||||
advertisingIDEnabled:advertisingIDEnabled
|
advertisingIDEnabled:advertisingIDEnabled
|
||||||
implicitLoggingEnabled:implicitLoggingEnabled
|
implicitLoggingEnabled:implicitLoggingEnabled
|
||||||
implicitPurchaseLoggingEnabled:implicitPurchaseLoggingEnabled
|
implicitPurchaseLoggingEnabled:implicitPurchaseLoggingEnabled
|
||||||
appIndexingTriggerEnabled:appIndexingTriggerEnabled
|
|
||||||
systemAuthenticationEnabled:systemAuthenticationEnabled
|
systemAuthenticationEnabled:systemAuthenticationEnabled
|
||||||
nativeAuthFlowEnabled:nativeAuthFlowEnabled
|
nativeAuthFlowEnabled:nativeAuthFlowEnabled
|
||||||
dialogConfigurations:dialogConfigurations
|
dialogConfigurations:dialogConfigurations
|
||||||
@ -244,8 +238,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
|||||||
[encoder encodeBool:_implicitLoggingEnabled forKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_KEY];
|
[encoder encodeBool:_implicitLoggingEnabled forKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_KEY];
|
||||||
[encoder encodeBool:_implicitPurchaseLoggingEnabled
|
[encoder encodeBool:_implicitPurchaseLoggingEnabled
|
||||||
forKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_PURCHASE_LOGGING_ENABLED_KEY];
|
forKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_PURCHASE_LOGGING_ENABLED_KEY];
|
||||||
[encoder encodeBool:_appIndexingTriggerEnabled
|
|
||||||
forKey:FBSDK_SERVER_CONFIGURATION_APP_INDEXING_TRIGGER_ENABLED_KEY];
|
|
||||||
[encoder encodeBool:_loginTooltipEnabled forKey:FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_ENABLED_KEY];
|
[encoder encodeBool:_loginTooltipEnabled forKey:FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_ENABLED_KEY];
|
||||||
[encoder encodeObject:_loginTooltipText forKey:FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_TEXT_KEY];
|
[encoder encodeObject:_loginTooltipText forKey:FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_TEXT_KEY];
|
||||||
[encoder encodeBool:_nativeAuthFlowEnabled forKey:FBSDK_SERVER_CONFIGURATION_NATIVE_AUTH_FLOW_ENABLED_KEY];
|
[encoder encodeBool:_nativeAuthFlowEnabled forKey:FBSDK_SERVER_CONFIGURATION_NATIVE_AUTH_FLOW_ENABLED_KEY];
|
||||||
|
|||||||
@ -65,7 +65,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
|||||||
FBSDKServerConfigurationManagerAppEventsFeaturesNone = 0,
|
FBSDKServerConfigurationManagerAppEventsFeaturesNone = 0,
|
||||||
FBSDKServerConfigurationManagerAppEventsFeaturesAdvertisingIDEnabled = 1 << 0,
|
FBSDKServerConfigurationManagerAppEventsFeaturesAdvertisingIDEnabled = 1 << 0,
|
||||||
FBSDKServerConfigurationManagerAppEventsFeaturesImplicitPurchaseLoggingEnabled = 1 << 1,
|
FBSDKServerConfigurationManagerAppEventsFeaturesImplicitPurchaseLoggingEnabled = 1 << 1,
|
||||||
FBSDKServerConfigurationManagerAppEventsFeaturesAppIndexingTriggerEnabled = 1 << 6,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma mark - Public Class Methods
|
#pragma mark - Public Class Methods
|
||||||
@ -173,7 +172,7 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
|||||||
NSUInteger appEventsFeatures = [FBSDKTypeUtility unsignedIntegerValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_APP_EVENTS_FEATURES_FIELD]];
|
NSUInteger appEventsFeatures = [FBSDKTypeUtility unsignedIntegerValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_APP_EVENTS_FEATURES_FIELD]];
|
||||||
BOOL advertisingIDEnabled = (appEventsFeatures & FBSDKServerConfigurationManagerAppEventsFeaturesAdvertisingIDEnabled);
|
BOOL advertisingIDEnabled = (appEventsFeatures & FBSDKServerConfigurationManagerAppEventsFeaturesAdvertisingIDEnabled);
|
||||||
BOOL implicitPurchaseLoggingEnabled = (appEventsFeatures & FBSDKServerConfigurationManagerAppEventsFeaturesImplicitPurchaseLoggingEnabled);
|
BOOL implicitPurchaseLoggingEnabled = (appEventsFeatures & FBSDKServerConfigurationManagerAppEventsFeaturesImplicitPurchaseLoggingEnabled);
|
||||||
BOOL appIndexingTriggerEnabled = (appEventsFeatures & FBSDKServerConfigurationManagerAppEventsFeaturesAppIndexingTriggerEnabled);
|
|
||||||
NSString *appName = [FBSDKTypeUtility stringValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_APP_NAME_FIELD]];
|
NSString *appName = [FBSDKTypeUtility stringValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_APP_NAME_FIELD]];
|
||||||
BOOL loginTooltipEnabled = [FBSDKTypeUtility boolValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_ENABLED_FIELD]];
|
BOOL loginTooltipEnabled = [FBSDKTypeUtility boolValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_ENABLED_FIELD]];
|
||||||
NSString *loginTooltipText = [FBSDKTypeUtility stringValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_TEXT_FIELD]];
|
NSString *loginTooltipText = [FBSDKTypeUtility stringValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_TEXT_FIELD]];
|
||||||
@ -199,7 +198,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
|||||||
advertisingIDEnabled:advertisingIDEnabled
|
advertisingIDEnabled:advertisingIDEnabled
|
||||||
implicitLoggingEnabled:implicitLoggingEnabled
|
implicitLoggingEnabled:implicitLoggingEnabled
|
||||||
implicitPurchaseLoggingEnabled:implicitPurchaseLoggingEnabled
|
implicitPurchaseLoggingEnabled:implicitPurchaseLoggingEnabled
|
||||||
appIndexingTriggerEnabled:appIndexingTriggerEnabled
|
|
||||||
systemAuthenticationEnabled:systemAuthenticationEnabled
|
systemAuthenticationEnabled:systemAuthenticationEnabled
|
||||||
nativeAuthFlowEnabled:nativeAuthFlowEnabled
|
nativeAuthFlowEnabled:nativeAuthFlowEnabled
|
||||||
dialogConfigurations:dialogConfigurations
|
dialogConfigurations:dialogConfigurations
|
||||||
@ -300,7 +298,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
|||||||
advertisingIDEnabled:NO
|
advertisingIDEnabled:NO
|
||||||
implicitLoggingEnabled:NO
|
implicitLoggingEnabled:NO
|
||||||
implicitPurchaseLoggingEnabled:NO
|
implicitPurchaseLoggingEnabled:NO
|
||||||
appIndexingTriggerEnabled:NO
|
|
||||||
systemAuthenticationEnabled:NO
|
systemAuthenticationEnabled:NO
|
||||||
nativeAuthFlowEnabled:NO
|
nativeAuthFlowEnabled:NO
|
||||||
dialogConfigurations:nil
|
dialogConfigurations:nil
|
||||||
|
|||||||
@ -49,7 +49,6 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
|||||||
FBSDKLoginManagerLogger *_logger;
|
FBSDKLoginManagerLogger *_logger;
|
||||||
FBSDKLoginManagerState _state;
|
FBSDKLoginManagerState _state;
|
||||||
FBSDKKeychainStore *_keychainStore;
|
FBSDKKeychainStore *_keychainStore;
|
||||||
BOOL _usedSFAuthSession;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void)initialize
|
+ (void)initialize
|
||||||
@ -160,14 +159,6 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
|||||||
{
|
{
|
||||||
switch (_state) {
|
switch (_state) {
|
||||||
case FBSDKLoginManagerStateStart: {
|
case FBSDKLoginManagerStateStart: {
|
||||||
if (self->_usedSFAuthSession) {
|
|
||||||
// Using SFAuthenticationSession makes an interestitial dialog that blocks the app, but in certain situations such as
|
|
||||||
// screen lock it can be dismissed and have the control returned to the app without invoking the completionHandler.
|
|
||||||
// In this case, the viewcontroller has the control back and tried to reinvoke the login. This is acceptable behavior
|
|
||||||
// and we should pop up the dialog again
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
NSString *errorStr = @"** WARNING: You are trying to start a login while a previous login has not finished yet."
|
NSString *errorStr = @"** WARNING: You are trying to start a login while a previous login has not finished yet."
|
||||||
"This is unsupported behavior. You should wait until the previous login handler gets called to start a new login.";
|
"This is unsupported behavior. You should wait until the previous login handler gets called to start a new login.";
|
||||||
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors
|
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors
|
||||||
@ -207,8 +198,6 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
|||||||
|
|
||||||
- (void)completeAuthentication:(FBSDKLoginCompletionParameters *)parameters expectChallenge:(BOOL)expectChallenge
|
- (void)completeAuthentication:(FBSDKLoginCompletionParameters *)parameters expectChallenge:(BOOL)expectChallenge
|
||||||
{
|
{
|
||||||
NSSet *recentlyGrantedPermissions = nil;
|
|
||||||
NSSet *recentlyDeclinedPermissions = nil;
|
|
||||||
FBSDKLoginManagerLoginResult *result = nil;
|
FBSDKLoginManagerLoginResult *result = nil;
|
||||||
NSError *error = parameters.error;
|
NSError *error = parameters.error;
|
||||||
|
|
||||||
@ -237,6 +226,9 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
|||||||
NSSet *grantedPermissions = parameters.permissions;
|
NSSet *grantedPermissions = parameters.permissions;
|
||||||
NSSet *declinedPermissions = parameters.declinedPermissions;
|
NSSet *declinedPermissions = parameters.declinedPermissions;
|
||||||
|
|
||||||
|
NSSet *recentlyGrantedPermissions = nil;
|
||||||
|
NSSet *recentlyDeclinedPermissions = nil;
|
||||||
|
|
||||||
[self determineRecentlyGrantedPermissions:&recentlyGrantedPermissions
|
[self determineRecentlyGrantedPermissions:&recentlyGrantedPermissions
|
||||||
recentlyDeclinedPermissions:&recentlyDeclinedPermissions
|
recentlyDeclinedPermissions:&recentlyDeclinedPermissions
|
||||||
forGrantedPermission:grantedPermissions
|
forGrantedPermission:grantedPermissions
|
||||||
@ -267,18 +259,13 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
|||||||
|
|
||||||
if (cancelled) {
|
if (cancelled) {
|
||||||
NSSet *declinedPermissions = nil;
|
NSSet *declinedPermissions = nil;
|
||||||
if ([FBSDKAccessToken currentAccessToken] != nil) {
|
|
||||||
if (parameters.isSystemAccount) {
|
// If a System Account reauthorization was cancelled by the user tapping Don't Allow
|
||||||
// If a System Account reauthorization was cancelled by the user tapping Don't Allow
|
// then add the declined permissions to the login result. The Accounts framework
|
||||||
// then add the declined permissions to the login result. The Accounts framework
|
// doesn't register the decline with Facebook, which is why we don't update the
|
||||||
// doesn't register the decline with Facebook, which is why we don't update the
|
// access token.
|
||||||
// access token.
|
if ([FBSDKAccessToken currentAccessToken] != nil && parameters.isSystemAccount) {
|
||||||
declinedPermissions = parameters.declinedPermissions;
|
declinedPermissions = parameters.declinedPermissions;
|
||||||
} else {
|
|
||||||
// Always include the list of declined permissions from this login request
|
|
||||||
// if an access token is already cached by the SDK
|
|
||||||
declinedPermissions = recentlyDeclinedPermissions;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
result = [[FBSDKLoginManagerLoginResult alloc] initWithToken:nil
|
result = [[FBSDKLoginManagerLoginResult alloc] initWithToken:nil
|
||||||
@ -395,7 +382,6 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
|||||||
{
|
{
|
||||||
FBSDKServerConfiguration *serverConfiguration = [FBSDKServerConfigurationManager cachedServerConfiguration];
|
FBSDKServerConfiguration *serverConfiguration = [FBSDKServerConfigurationManager cachedServerConfiguration];
|
||||||
NSDictionary *loginParams = [self logInParametersWithPermissions:_requestedPermissions serverConfiguration:serverConfiguration];
|
NSDictionary *loginParams = [self logInParametersWithPermissions:_requestedPermissions serverConfiguration:serverConfiguration];
|
||||||
self->_usedSFAuthSession = NO;
|
|
||||||
|
|
||||||
void(^completion)(BOOL, NSString *, NSError *) = ^void(BOOL didPerformLogIn, NSString *authMethod, NSError *error) {
|
void(^completion)(BOOL, NSString *, NSError *) = ^void(BOOL didPerformLogIn, NSString *authMethod, NSError *error) {
|
||||||
if (didPerformLogIn) {
|
if (didPerformLogIn) {
|
||||||
@ -432,7 +418,7 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Intentional fall through. Switching to browser login instead.
|
// intentional fall through.
|
||||||
}
|
}
|
||||||
case FBSDKLoginBehaviorBrowser: {
|
case FBSDKLoginBehaviorBrowser: {
|
||||||
[self performBrowserLogInWithParameters:loginParams handler:^(BOOL openedURL,
|
[self performBrowserLogInWithParameters:loginParams handler:^(BOOL openedURL,
|
||||||
@ -562,10 +548,8 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
|||||||
handler(didOpen, authMethod, anError);
|
handler(didOpen, authMethod, anError);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (useSafariViewController) {
|
if (useSafariViewController) {
|
||||||
// Note based on above, authURL must be a http scheme. If that changes, add a guard, otherwise SFVC can throw
|
// Note based on above, authURL must be a http scheme. If that changes, add a guard, otherwise SFVC can throw
|
||||||
self->_usedSFAuthSession = YES;
|
|
||||||
[[FBSDKApplicationDelegate sharedInstance] openURLWithSafariViewController:authURL
|
[[FBSDKApplicationDelegate sharedInstance] openURLWithSafariViewController:authURL
|
||||||
sender:self
|
sender:self
|
||||||
fromViewController:self.fromViewController
|
fromViewController:self.fromViewController
|
||||||
|
|||||||
@ -35,22 +35,6 @@ static NSString *const kButtonsKey = @"buttons";
|
|||||||
|
|
||||||
@implementation FBSDKShareMessengerContentUtility
|
@implementation FBSDKShareMessengerContentUtility
|
||||||
|
|
||||||
static BOOL _URLHasFacebookDomain(NSURL *URL)
|
|
||||||
{
|
|
||||||
NSString *urlHost = [URL.host lowercaseString];
|
|
||||||
NSArray<NSString *> *pathComponents = [URL pathComponents];
|
|
||||||
|
|
||||||
/**
|
|
||||||
Check the following three different cases...
|
|
||||||
1. Check if host is facebook.com, such as in 'https://facebok.com/test'
|
|
||||||
2. Check if host is someprefix.facebook.com, such as in 'https://www.facebook.com/test'
|
|
||||||
3. Check if host is null, but the first path component is facebook.com
|
|
||||||
*/
|
|
||||||
return [urlHost isEqualToString:@"facebook.com"] ||
|
|
||||||
[urlHost hasSuffix:@".facebook.com"] ||
|
|
||||||
([[[pathComponents firstObject] lowercaseString] hasSuffix:@"facebook.com"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void _AddToContentPreviewDictionaryForURLButton(NSMutableDictionary *dictionary,
|
static void _AddToContentPreviewDictionaryForURLButton(NSMutableDictionary *dictionary,
|
||||||
FBSDKShareMessengerURLActionButton *urlButton)
|
FBSDKShareMessengerURLActionButton *urlButton)
|
||||||
{
|
{
|
||||||
@ -184,15 +168,6 @@ static NSArray *_SerializableOpenGraphMusicTemplateContentFromContent(FBSDKShare
|
|||||||
return serializableOpenGraphMusicTemplateContent;
|
return serializableOpenGraphMusicTemplateContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
static NSString *_MediaTemplateURLSerializationKey(NSURL *mediaURL)
|
|
||||||
{
|
|
||||||
if (_URLHasFacebookDomain(mediaURL)) {
|
|
||||||
return @"facebook_media_url";
|
|
||||||
} else {
|
|
||||||
return @"image_url";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void)_addToParameters:(NSMutableDictionary *)parameters
|
+ (void)_addToParameters:(NSMutableDictionary *)parameters
|
||||||
contentForShare:(NSMutableDictionary *)contentForShare
|
contentForShare:(NSMutableDictionary *)contentForShare
|
||||||
contentForPreview:(NSMutableDictionary *)contentForPreview
|
contentForPreview:(NSMutableDictionary *)contentForPreview
|
||||||
@ -257,9 +232,7 @@ forShareMessengerMediaTemplateContent:(FBSDKShareMessengerMediaTemplateContent *
|
|||||||
NSMutableDictionary *contentForPreview = [NSMutableDictionary dictionary];
|
NSMutableDictionary *contentForPreview = [NSMutableDictionary dictionary];
|
||||||
[FBSDKInternalUtility dictionary:contentForPreview setObject:@"DEFAULT" forKey:@"preview_type"];
|
[FBSDKInternalUtility dictionary:contentForPreview setObject:@"DEFAULT" forKey:@"preview_type"];
|
||||||
[FBSDKInternalUtility dictionary:contentForPreview setObject:mediaTemplateContent.attachmentID forKey:@"attachment_id"];
|
[FBSDKInternalUtility dictionary:contentForPreview setObject:mediaTemplateContent.attachmentID forKey:@"attachment_id"];
|
||||||
[FBSDKInternalUtility dictionary:contentForPreview
|
[FBSDKInternalUtility dictionary:contentForPreview setObject:mediaTemplateContent.mediaURL.absoluteString forKey:@"facebook_media_url"];
|
||||||
setObject:mediaTemplateContent.mediaURL.absoluteString
|
|
||||||
forKey:_MediaTemplateURLSerializationKey(mediaTemplateContent.mediaURL)];
|
|
||||||
[FBSDKInternalUtility dictionary:contentForPreview setObject:_MediaTypeString(mediaTemplateContent.mediaType) forKey:@"media_type"];
|
[FBSDKInternalUtility dictionary:contentForPreview setObject:_MediaTypeString(mediaTemplateContent.mediaType) forKey:@"media_type"];
|
||||||
_AddToContentPreviewDictionaryForButton(contentForPreview, mediaTemplateContent.button);
|
_AddToContentPreviewDictionaryForButton(contentForPreview, mediaTemplateContent.button);
|
||||||
|
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
../../../../../PNObject/Classes/PNObject+PNObjectDELETEConnection.h
|
|
||||||
@ -1 +0,0 @@
|
|||||||
../../../../../PNObject/Classes/PNObject+PNObjectGETConnection.h
|
|
||||||
@ -1 +0,0 @@
|
|||||||
../../../../../PNObject/Classes/PNObject+PNObjectPOSTConnection.h
|
|
||||||
@ -1 +0,0 @@
|
|||||||
../../../../../PNObject/Classes/PNObject+PNObjectDELETEConnection.h
|
|
||||||
@ -1 +0,0 @@
|
|||||||
../../../../../PNObject/Classes/PNObject+PNObjectGETConnection.h
|
|
||||||
@ -1 +0,0 @@
|
|||||||
../../../../../PNObject/Classes/PNObject+PNObjectPOSTConnection.h
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "PNObject",
|
"name": "PNObject",
|
||||||
"version": "2.4.5",
|
"version": "1.3.4",
|
||||||
"summary": "PNObject is a simple replica of the more complex ParseObject",
|
"summary": "PNObject is a simple replica of the more complex ParseObject",
|
||||||
"homepage": "https://github.com/giuseppenucifora/PNObject",
|
"homepage": "https://github.com/giuseppenucifora/PNObject",
|
||||||
"license": {
|
"license": {
|
||||||
@ -12,7 +12,7 @@
|
|||||||
},
|
},
|
||||||
"source": {
|
"source": {
|
||||||
"git": "https://github.com/giuseppenucifora/PNObject.git",
|
"git": "https://github.com/giuseppenucifora/PNObject.git",
|
||||||
"tag": "2.4.5"
|
"tag": "1.3.4"
|
||||||
},
|
},
|
||||||
"platforms": {
|
"platforms": {
|
||||||
"ios": "8.0"
|
"ios": "8.0"
|
||||||
|
|||||||
52
Example/Pods/Manifest.lock
generated
52
Example/Pods/Manifest.lock
generated
@ -1,18 +1,18 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- AFNetworking (3.2.0):
|
- AFNetworking (3.1.0):
|
||||||
- AFNetworking/NSURLSession (= 3.2.0)
|
- AFNetworking/NSURLSession (= 3.1.0)
|
||||||
- AFNetworking/Reachability (= 3.2.0)
|
- AFNetworking/Reachability (= 3.1.0)
|
||||||
- AFNetworking/Security (= 3.2.0)
|
- AFNetworking/Security (= 3.1.0)
|
||||||
- AFNetworking/Serialization (= 3.2.0)
|
- AFNetworking/Serialization (= 3.1.0)
|
||||||
- AFNetworking/UIKit (= 3.2.0)
|
- AFNetworking/UIKit (= 3.1.0)
|
||||||
- AFNetworking/NSURLSession (3.2.0):
|
- AFNetworking/NSURLSession (3.1.0):
|
||||||
- AFNetworking/Reachability
|
- AFNetworking/Reachability
|
||||||
- AFNetworking/Security
|
- AFNetworking/Security
|
||||||
- AFNetworking/Serialization
|
- AFNetworking/Serialization
|
||||||
- AFNetworking/Reachability (3.2.0)
|
- AFNetworking/Reachability (3.1.0)
|
||||||
- AFNetworking/Security (3.2.0)
|
- AFNetworking/Security (3.1.0)
|
||||||
- AFNetworking/Serialization (3.2.0)
|
- AFNetworking/Serialization (3.1.0)
|
||||||
- AFNetworking/UIKit (3.2.0):
|
- AFNetworking/UIKit (3.1.0):
|
||||||
- AFNetworking/NSURLSession
|
- AFNetworking/NSURLSession
|
||||||
- Bolts (1.9.0):
|
- Bolts (1.9.0):
|
||||||
- Bolts/AppLinks (= 1.9.0)
|
- Bolts/AppLinks (= 1.9.0)
|
||||||
@ -26,19 +26,19 @@ PODS:
|
|||||||
- DJLocalization/Core (= 1.2.2)
|
- DJLocalization/Core (= 1.2.2)
|
||||||
- DJLocalization/Core (1.2.2)
|
- DJLocalization/Core (1.2.2)
|
||||||
- Expecta (1.0.6)
|
- Expecta (1.0.6)
|
||||||
- FBSDKCoreKit (4.31.1):
|
- FBSDKCoreKit (4.29.0):
|
||||||
- Bolts (~> 1.7)
|
- Bolts (~> 1.7)
|
||||||
- FBSDKLoginKit (4.31.1):
|
- FBSDKLoginKit (4.29.0):
|
||||||
|
- FBSDKCoreKit
|
||||||
|
- FBSDKShareKit (4.29.0):
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
- FBSDKShareKit (4.31.1):
|
|
||||||
- FBSDKCoreKit (~> 4.31.1)
|
|
||||||
- NSDataAES (0.2.2)
|
- NSDataAES (0.2.2)
|
||||||
- NSDate_Utils (1.1.0):
|
- NSDate_Utils (1.1.0):
|
||||||
- DJLocalization
|
- DJLocalization
|
||||||
- NSString-Helper (1.0.6)
|
- NSString-Helper (1.0.5)
|
||||||
- nv-ios-http-status (0.0.1)
|
- nv-ios-http-status (0.0.1)
|
||||||
- PEAR-FileManager-iOS (1.3.1)
|
- PEAR-FileManager-iOS (1.3.1)
|
||||||
- PNObject (2.4.5):
|
- PNObject (1.3.4):
|
||||||
- AFNetworking
|
- AFNetworking
|
||||||
- CodFis-Helper
|
- CodFis-Helper
|
||||||
- DDDKeychainWrapper
|
- DDDKeychainWrapper
|
||||||
@ -58,7 +58,7 @@ PODS:
|
|||||||
- RZDataBinding (2.1.0)
|
- RZDataBinding (2.1.0)
|
||||||
- Specta (1.0.7)
|
- Specta (1.0.7)
|
||||||
- StrongestPasswordValidator (0.1.2)
|
- StrongestPasswordValidator (0.1.2)
|
||||||
- UIDevice-Utils (1.0.7)
|
- UIDevice-Utils (1.0.0)
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- Expecta
|
- Expecta
|
||||||
@ -71,27 +71,27 @@ EXTERNAL SOURCES:
|
|||||||
:path: ../
|
:path: ../
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
AFNetworking: 8ac6017b94ea105479f7776e5288e48ae9c59bb4
|
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
|
||||||
Bolts: ac6567323eac61e203f6a9763667d0f711be34c8
|
Bolts: ac6567323eac61e203f6a9763667d0f711be34c8
|
||||||
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
||||||
DDDKeychainWrapper: e681a4daba6448786fa83b4941f58102a33b1897
|
DDDKeychainWrapper: e681a4daba6448786fa83b4941f58102a33b1897
|
||||||
DJLocalization: 0c84029af375647d4104a42ae36be87194c46c47
|
DJLocalization: 0c84029af375647d4104a42ae36be87194c46c47
|
||||||
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
|
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
|
||||||
FBSDKCoreKit: e08ccfcefa7bc1347a07c276dac9bf6c7fe57024
|
FBSDKCoreKit: 6f139173dc63a1deaff4430a55f2fe5bb222d2af
|
||||||
FBSDKLoginKit: 99797ac39252fef6f72600b886f6ee60b4b29cab
|
FBSDKLoginKit: 56a057ca6822535ea0faa25f57a7c41edb697fd4
|
||||||
FBSDKShareKit: e640c41c9fcd61929eeb3d0c21ad335103e7cb62
|
FBSDKShareKit: 18a2cd118aef11dd657fe7e8b64bae5c719088b2
|
||||||
NSDataAES: 967ea3337476a80e9838a533c25d570a06855ed0
|
NSDataAES: 967ea3337476a80e9838a533c25d570a06855ed0
|
||||||
NSDate_Utils: c858a89da6e204ecf53aca48dbccb4da4d25bc9e
|
NSDate_Utils: c858a89da6e204ecf53aca48dbccb4da4d25bc9e
|
||||||
NSString-Helper: 389265918b2a4c5b0d09f0e03c607e8e5e254dd7
|
NSString-Helper: 459e1b6a62b3bf7db10f01b0d102548608e945c4
|
||||||
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
||||||
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
||||||
PNObject: e754ef3f56399808cdb48af39d610c8132f2effe
|
PNObject: 8dc560680a7a48060ed309b019ca4fc41505cc07
|
||||||
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
|
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
|
||||||
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
|
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
|
||||||
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
|
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
|
||||||
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
|
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
|
||||||
UIDevice-Utils: 8ff812220ce91e97a2cea243bd4160e7b958ec76
|
UIDevice-Utils: ff37bd042127117572d6ce4c5ff074f4f54ab5ed
|
||||||
|
|
||||||
PODFILE CHECKSUM: fcd5d1cf3426c7c9c5b3e5edcd4b8e5402ee7f2e
|
PODFILE CHECKSUM: fcd5d1cf3426c7c9c5b3e5edcd4b8e5402ee7f2e
|
||||||
|
|
||||||
COCOAPODS: 1.4.0
|
COCOAPODS: 1.3.1
|
||||||
|
|||||||
@ -30,5 +30,4 @@
|
|||||||
|
|
||||||
- (NSString*) sha512;
|
- (NSString*) sha512;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -46,13 +46,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) isValidUrl {
|
- (BOOL) isValidUrl {
|
||||||
NSString *urlRegEx = @"(http|https)://((\\w)*|([0-9]*)|([-|_])*)+([\\.|/]((\\w)*|([0-9]*)|([-|_])*))+";
|
NSString *urlRegEx =
|
||||||
NSString *urlRegEx2 =@"((?:http|https)://)?(?:www\\.)?[\\w\\d\\-_]+\\.\\w{2,3}(\\.\\w{2})?(/(?<=/)(?:[\\w\\d\\-./_]+)?)?";
|
@"(http|https)://((\\w)*|([0-9]*)|([-|_])*)+([\\.|/]((\\w)*|([0-9]*)|([-|_])*))+";
|
||||||
|
|
||||||
NSPredicate *urlTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", urlRegEx];
|
NSPredicate *urlTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", urlRegEx];
|
||||||
NSPredicate *urlTest2 = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", urlRegEx2];
|
return [urlTest evaluateWithObject:self];
|
||||||
|
|
||||||
return [urlTest evaluateWithObject:self]|| [urlTest2 evaluateWithObject:self];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) isValidTaxCode {
|
- (BOOL) isValidTaxCode {
|
||||||
|
|||||||
2208
Example/Pods/Pods.xcodeproj/project.pbxproj
generated
2208
Example/Pods/Pods.xcodeproj/project.pbxproj
generated
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,9 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AFNetworking
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
OTHER_LDFLAGS = -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration"
|
OTHER_LDFLAGS = -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/AFNetworking
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/AFNetworking
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Bolts
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Bolts
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Bolts" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Bolts" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Bolts
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Bolts
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CodFis-Helper
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/CodFis-Helper
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/CodFis-Helper" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/CodFis-Helper" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/CodFis-Helper
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/CodFis-Helper
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/DDDKeychainWrapper
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/DDDKeychainWrapper
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
OTHER_LDFLAGS = -framework "Security"
|
OTHER_LDFLAGS = -framework "Security"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/DDDKeychainWrapper
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/DDDKeychainWrapper
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/DJLocalization
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/DJLocalization
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/DJLocalization" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/DJLocalization" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit"
|
OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/DJLocalization
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/DJLocalization
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Expecta
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Expecta
|
||||||
ENABLE_BITCODE = NO
|
ENABLE_BITCODE = NO
|
||||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Expecta" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Expecta" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
OTHER_LDFLAGS = -framework "Foundation" -framework "XCTest"
|
OTHER_LDFLAGS = -framework "Foundation" -framework "XCTest"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Expecta
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Expecta
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts"
|
LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Bolts"
|
||||||
OTHER_LDFLAGS = -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
OTHER_LDFLAGS = -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/FBSDKCoreKit
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/FBSDKCoreKit
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
|
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
|
||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit"
|
LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Bolts" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit"
|
||||||
OTHER_LDFLAGS = -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
OTHER_LDFLAGS = -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/FBSDKLoginKit
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/FBSDKLoginKit
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
|
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
|
||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FBSDKShareKit
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/FBSDKShareKit
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FBSDKShareKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FBSDKShareKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit"
|
LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Bolts" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit"
|
||||||
OTHER_LDFLAGS = -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
OTHER_LDFLAGS = -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/FBSDKShareKit
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/FBSDKShareKit
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/NSDataAES
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/NSDataAES
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/NSDataAES" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/NSDataAES" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/NSDataAES
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/NSDataAES
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/NSDate_Utils
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/NSDate_Utils
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/NSDate_Utils" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/NSDate_Utils" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DJLocalization"
|
LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/DJLocalization"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/NSDate_Utils
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/NSDate_Utils
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/NSString-Helper
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/NSString-Helper
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/NSString-Helper" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/NSString-Helper" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/NSString-Helper
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/NSString-Helper
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PEAR-FileManager-iOS
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/PEAR-FileManager-iOS
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/PEAR-FileManager-iOS
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/PEAR-FileManager-iOS
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PNObject
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/PNObject
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PNObject" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PNObject" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking" "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/CodFis-Helper" "${PODS_CONFIGURATION_BUILD_DIR}/DDDKeychainWrapper" "${PODS_CONFIGURATION_BUILD_DIR}/DJLocalization" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKShareKit" "${PODS_CONFIGURATION_BUILD_DIR}/NSDataAES" "${PODS_CONFIGURATION_BUILD_DIR}/NSDate_Utils" "${PODS_CONFIGURATION_BUILD_DIR}/NSString-Helper" "${PODS_CONFIGURATION_BUILD_DIR}/PEAR-FileManager-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/RZDataBinding" "${PODS_CONFIGURATION_BUILD_DIR}/StrongestPasswordValidator" "${PODS_CONFIGURATION_BUILD_DIR}/UIDevice-Utils" "${PODS_CONFIGURATION_BUILD_DIR}/nv-ios-http-status"
|
LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/Bolts" "$PODS_CONFIGURATION_BUILD_DIR/CodFis-Helper" "$PODS_CONFIGURATION_BUILD_DIR/DDDKeychainWrapper" "$PODS_CONFIGURATION_BUILD_DIR/DJLocalization" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKShareKit" "$PODS_CONFIGURATION_BUILD_DIR/NSDataAES" "$PODS_CONFIGURATION_BUILD_DIR/NSDate_Utils" "$PODS_CONFIGURATION_BUILD_DIR/NSString-Helper" "$PODS_CONFIGURATION_BUILD_DIR/PEAR-FileManager-iOS" "$PODS_CONFIGURATION_BUILD_DIR/RZDataBinding" "$PODS_CONFIGURATION_BUILD_DIR/StrongestPasswordValidator" "$PODS_CONFIGURATION_BUILD_DIR/UIDevice-Utils" "$PODS_CONFIGURATION_BUILD_DIR/nv-ios-http-status"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -3,7 +3,7 @@ This application makes use of the following third party libraries:
|
|||||||
|
|
||||||
## AFNetworking
|
## AFNetworking
|
||||||
|
|
||||||
Copyright (c) 2011-2016 Alamofire Software Foundation (http://alamofire.org/)
|
Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
</dict>
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
<key>FooterText</key>
|
<key>FooterText</key>
|
||||||
<string>Copyright (c) 2011-2016 Alamofire Software Foundation (http://alamofire.org/)
|
<string>Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -6,14 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
|||||||
|
|
||||||
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
|
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
|
||||||
|
|
||||||
# Used as a return value for each invocation of `strip_invalid_archs` function.
|
|
||||||
STRIP_BINARY_RETVAL=0
|
|
||||||
|
|
||||||
# This protects against multiple targets copying the same framework dependency at the same time. The solution
|
# This protects against multiple targets copying the same framework dependency at the same time. The solution
|
||||||
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
|
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
|
||||||
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
|
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
|
||||||
|
|
||||||
# Copies and strips a vendored framework
|
|
||||||
install_framework()
|
install_framework()
|
||||||
{
|
{
|
||||||
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
|
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
|
||||||
@ -62,31 +58,12 @@ install_framework()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Copies and strips a vendored dSYM
|
# Copies the dSYM of a vendored framework
|
||||||
install_dsym() {
|
install_dsym() {
|
||||||
local source="$1"
|
local source="$1"
|
||||||
if [ -r "$source" ]; then
|
if [ -r "$source" ]; then
|
||||||
# Copy the dSYM into a the targets temp dir.
|
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\""
|
||||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
|
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}"
|
||||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
|
|
||||||
|
|
||||||
local basename
|
|
||||||
basename="$(basename -s .framework.dSYM "$source")"
|
|
||||||
binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}"
|
|
||||||
|
|
||||||
# Strip invalid architectures so "fat" simulator / device frameworks work on device
|
|
||||||
if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then
|
|
||||||
strip_invalid_archs "$binary"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
|
|
||||||
# Move the stripped file into its final destination.
|
|
||||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
|
|
||||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
|
|
||||||
else
|
|
||||||
# The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
|
|
||||||
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,18 +85,10 @@ code_sign_if_enabled() {
|
|||||||
# Strip invalid architectures
|
# Strip invalid architectures
|
||||||
strip_invalid_archs() {
|
strip_invalid_archs() {
|
||||||
binary="$1"
|
binary="$1"
|
||||||
# Get architectures for current target binary
|
# Get architectures for current file
|
||||||
binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
|
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
|
||||||
# Intersect them with the architectures we are building for
|
|
||||||
intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
|
|
||||||
# If there are no archs supported by this binary then warn the user
|
|
||||||
if [[ -z "$intersected_archs" ]]; then
|
|
||||||
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
|
|
||||||
STRIP_BINARY_RETVAL=0
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
stripped=""
|
stripped=""
|
||||||
for arch in $binary_archs; do
|
for arch in $archs; do
|
||||||
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
|
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
|
||||||
# Strip non-valid architectures in-place
|
# Strip non-valid architectures in-place
|
||||||
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
|
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
|
||||||
@ -129,7 +98,6 @@ strip_invalid_archs() {
|
|||||||
if [[ "$stripped" ]]; then
|
if [[ "$stripped" ]]; then
|
||||||
echo "Stripped $binary of architectures:$stripped"
|
echo "Stripped $binary of architectures:$stripped"
|
||||||
fi
|
fi
|
||||||
STRIP_BINARY_RETVAL=1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
|
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking" "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/CodFis-Helper" "${PODS_CONFIGURATION_BUILD_DIR}/DDDKeychainWrapper" "${PODS_CONFIGURATION_BUILD_DIR}/DJLocalization" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKShareKit" "${PODS_CONFIGURATION_BUILD_DIR}/NSDataAES" "${PODS_CONFIGURATION_BUILD_DIR}/NSDate_Utils" "${PODS_CONFIGURATION_BUILD_DIR}/NSString-Helper" "${PODS_CONFIGURATION_BUILD_DIR}/PEAR-FileManager-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PNObject" "${PODS_CONFIGURATION_BUILD_DIR}/PureLayout" "${PODS_CONFIGURATION_BUILD_DIR}/RZDataBinding" "${PODS_CONFIGURATION_BUILD_DIR}/StrongestPasswordValidator" "${PODS_CONFIGURATION_BUILD_DIR}/UIDevice-Utils" "${PODS_CONFIGURATION_BUILD_DIR}/nv-ios-http-status"
|
LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/Bolts" "$PODS_CONFIGURATION_BUILD_DIR/CodFis-Helper" "$PODS_CONFIGURATION_BUILD_DIR/DDDKeychainWrapper" "$PODS_CONFIGURATION_BUILD_DIR/DJLocalization" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKShareKit" "$PODS_CONFIGURATION_BUILD_DIR/NSDataAES" "$PODS_CONFIGURATION_BUILD_DIR/NSDate_Utils" "$PODS_CONFIGURATION_BUILD_DIR/NSString-Helper" "$PODS_CONFIGURATION_BUILD_DIR/PEAR-FileManager-iOS" "$PODS_CONFIGURATION_BUILD_DIR/PNObject" "$PODS_CONFIGURATION_BUILD_DIR/PureLayout" "$PODS_CONFIGURATION_BUILD_DIR/RZDataBinding" "$PODS_CONFIGURATION_BUILD_DIR/StrongestPasswordValidator" "$PODS_CONFIGURATION_BUILD_DIR/UIDevice-Utils" "$PODS_CONFIGURATION_BUILD_DIR/nv-ios-http-status"
|
||||||
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/Bolts" -isystem "${PODS_ROOT}/Headers/Public/CodFis-Helper" -isystem "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" -isystem "${PODS_ROOT}/Headers/Public/DJLocalization" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKShareKit" -isystem "${PODS_ROOT}/Headers/Public/NSDataAES" -isystem "${PODS_ROOT}/Headers/Public/NSDate_Utils" -isystem "${PODS_ROOT}/Headers/Public/NSString-Helper" -isystem "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" -isystem "${PODS_ROOT}/Headers/Public/PNObject" -isystem "${PODS_ROOT}/Headers/Public/PureLayout" -isystem "${PODS_ROOT}/Headers/Public/RZDataBinding" -isystem "${PODS_ROOT}/Headers/Public/Specta" -isystem "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" -isystem "${PODS_ROOT}/Headers/Public/UIDevice-Utils" -isystem "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/Bolts" -isystem "${PODS_ROOT}/Headers/Public/CodFis-Helper" -isystem "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" -isystem "${PODS_ROOT}/Headers/Public/DJLocalization" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKShareKit" -isystem "${PODS_ROOT}/Headers/Public/NSDataAES" -isystem "${PODS_ROOT}/Headers/Public/NSDate_Utils" -isystem "${PODS_ROOT}/Headers/Public/NSString-Helper" -isystem "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" -isystem "${PODS_ROOT}/Headers/Public/PNObject" -isystem "${PODS_ROOT}/Headers/Public/PureLayout" -isystem "${PODS_ROOT}/Headers/Public/RZDataBinding" -isystem "${PODS_ROOT}/Headers/Public/Specta" -isystem "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" -isystem "${PODS_ROOT}/Headers/Public/UIDevice-Utils" -isystem "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"Bolts" -l"CodFis-Helper" -l"DDDKeychainWrapper" -l"DJLocalization" -l"FBSDKCoreKit" -l"FBSDKLoginKit" -l"FBSDKShareKit" -l"NSDataAES" -l"NSDate_Utils" -l"NSString-Helper" -l"PEAR-FileManager-iOS" -l"PNObject" -l"PureLayout" -l"RZDataBinding" -l"StrongestPasswordValidator" -l"UIDevice-Utils" -l"nv-ios-http-status" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"Bolts" -l"CodFis-Helper" -l"DDDKeychainWrapper" -l"DJLocalization" -l"FBSDKCoreKit" -l"FBSDKLoginKit" -l"FBSDKShareKit" -l"NSDataAES" -l"NSDate_Utils" -l"NSString-Helper" -l"PEAR-FileManager-iOS" -l"PNObject" -l"PureLayout" -l"RZDataBinding" -l"StrongestPasswordValidator" -l"UIDevice-Utils" -l"nv-ios-http-status" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
||||||
PODS_ROOT = ${SRCROOT}/Pods
|
PODS_ROOT = ${SRCROOT}/Pods
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking" "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/CodFis-Helper" "${PODS_CONFIGURATION_BUILD_DIR}/DDDKeychainWrapper" "${PODS_CONFIGURATION_BUILD_DIR}/DJLocalization" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKShareKit" "${PODS_CONFIGURATION_BUILD_DIR}/NSDataAES" "${PODS_CONFIGURATION_BUILD_DIR}/NSDate_Utils" "${PODS_CONFIGURATION_BUILD_DIR}/NSString-Helper" "${PODS_CONFIGURATION_BUILD_DIR}/PEAR-FileManager-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PNObject" "${PODS_CONFIGURATION_BUILD_DIR}/PureLayout" "${PODS_CONFIGURATION_BUILD_DIR}/RZDataBinding" "${PODS_CONFIGURATION_BUILD_DIR}/StrongestPasswordValidator" "${PODS_CONFIGURATION_BUILD_DIR}/UIDevice-Utils" "${PODS_CONFIGURATION_BUILD_DIR}/nv-ios-http-status"
|
LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/Bolts" "$PODS_CONFIGURATION_BUILD_DIR/CodFis-Helper" "$PODS_CONFIGURATION_BUILD_DIR/DDDKeychainWrapper" "$PODS_CONFIGURATION_BUILD_DIR/DJLocalization" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKShareKit" "$PODS_CONFIGURATION_BUILD_DIR/NSDataAES" "$PODS_CONFIGURATION_BUILD_DIR/NSDate_Utils" "$PODS_CONFIGURATION_BUILD_DIR/NSString-Helper" "$PODS_CONFIGURATION_BUILD_DIR/PEAR-FileManager-iOS" "$PODS_CONFIGURATION_BUILD_DIR/PNObject" "$PODS_CONFIGURATION_BUILD_DIR/PureLayout" "$PODS_CONFIGURATION_BUILD_DIR/RZDataBinding" "$PODS_CONFIGURATION_BUILD_DIR/StrongestPasswordValidator" "$PODS_CONFIGURATION_BUILD_DIR/UIDevice-Utils" "$PODS_CONFIGURATION_BUILD_DIR/nv-ios-http-status"
|
||||||
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/Bolts" -isystem "${PODS_ROOT}/Headers/Public/CodFis-Helper" -isystem "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" -isystem "${PODS_ROOT}/Headers/Public/DJLocalization" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKShareKit" -isystem "${PODS_ROOT}/Headers/Public/NSDataAES" -isystem "${PODS_ROOT}/Headers/Public/NSDate_Utils" -isystem "${PODS_ROOT}/Headers/Public/NSString-Helper" -isystem "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" -isystem "${PODS_ROOT}/Headers/Public/PNObject" -isystem "${PODS_ROOT}/Headers/Public/PureLayout" -isystem "${PODS_ROOT}/Headers/Public/RZDataBinding" -isystem "${PODS_ROOT}/Headers/Public/Specta" -isystem "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" -isystem "${PODS_ROOT}/Headers/Public/UIDevice-Utils" -isystem "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/Bolts" -isystem "${PODS_ROOT}/Headers/Public/CodFis-Helper" -isystem "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" -isystem "${PODS_ROOT}/Headers/Public/DJLocalization" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKShareKit" -isystem "${PODS_ROOT}/Headers/Public/NSDataAES" -isystem "${PODS_ROOT}/Headers/Public/NSDate_Utils" -isystem "${PODS_ROOT}/Headers/Public/NSString-Helper" -isystem "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" -isystem "${PODS_ROOT}/Headers/Public/PNObject" -isystem "${PODS_ROOT}/Headers/Public/PureLayout" -isystem "${PODS_ROOT}/Headers/Public/RZDataBinding" -isystem "${PODS_ROOT}/Headers/Public/Specta" -isystem "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" -isystem "${PODS_ROOT}/Headers/Public/UIDevice-Utils" -isystem "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"Bolts" -l"CodFis-Helper" -l"DDDKeychainWrapper" -l"DJLocalization" -l"FBSDKCoreKit" -l"FBSDKLoginKit" -l"FBSDKShareKit" -l"NSDataAES" -l"NSDate_Utils" -l"NSString-Helper" -l"PEAR-FileManager-iOS" -l"PNObject" -l"PureLayout" -l"RZDataBinding" -l"StrongestPasswordValidator" -l"UIDevice-Utils" -l"nv-ios-http-status" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"Bolts" -l"CodFis-Helper" -l"DDDKeychainWrapper" -l"DJLocalization" -l"FBSDKCoreKit" -l"FBSDKLoginKit" -l"FBSDKShareKit" -l"NSDataAES" -l"NSDate_Utils" -l"NSString-Helper" -l"PEAR-FileManager-iOS" -l"PNObject" -l"PureLayout" -l"RZDataBinding" -l"StrongestPasswordValidator" -l"UIDevice-Utils" -l"nv-ios-http-status" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
||||||
PODS_ROOT = ${SRCROOT}/Pods
|
PODS_ROOT = ${SRCROOT}/Pods
|
||||||
|
|||||||
@ -6,14 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
|||||||
|
|
||||||
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
|
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
|
||||||
|
|
||||||
# Used as a return value for each invocation of `strip_invalid_archs` function.
|
|
||||||
STRIP_BINARY_RETVAL=0
|
|
||||||
|
|
||||||
# This protects against multiple targets copying the same framework dependency at the same time. The solution
|
# This protects against multiple targets copying the same framework dependency at the same time. The solution
|
||||||
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
|
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
|
||||||
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
|
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
|
||||||
|
|
||||||
# Copies and strips a vendored framework
|
|
||||||
install_framework()
|
install_framework()
|
||||||
{
|
{
|
||||||
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
|
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
|
||||||
@ -62,31 +58,12 @@ install_framework()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Copies and strips a vendored dSYM
|
# Copies the dSYM of a vendored framework
|
||||||
install_dsym() {
|
install_dsym() {
|
||||||
local source="$1"
|
local source="$1"
|
||||||
if [ -r "$source" ]; then
|
if [ -r "$source" ]; then
|
||||||
# Copy the dSYM into a the targets temp dir.
|
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\""
|
||||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
|
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}"
|
||||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
|
|
||||||
|
|
||||||
local basename
|
|
||||||
basename="$(basename -s .framework.dSYM "$source")"
|
|
||||||
binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}"
|
|
||||||
|
|
||||||
# Strip invalid architectures so "fat" simulator / device frameworks work on device
|
|
||||||
if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then
|
|
||||||
strip_invalid_archs "$binary"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
|
|
||||||
# Move the stripped file into its final destination.
|
|
||||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
|
|
||||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
|
|
||||||
else
|
|
||||||
# The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
|
|
||||||
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,18 +85,10 @@ code_sign_if_enabled() {
|
|||||||
# Strip invalid architectures
|
# Strip invalid architectures
|
||||||
strip_invalid_archs() {
|
strip_invalid_archs() {
|
||||||
binary="$1"
|
binary="$1"
|
||||||
# Get architectures for current target binary
|
# Get architectures for current file
|
||||||
binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
|
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
|
||||||
# Intersect them with the architectures we are building for
|
|
||||||
intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
|
|
||||||
# If there are no archs supported by this binary then warn the user
|
|
||||||
if [[ -z "$intersected_archs" ]]; then
|
|
||||||
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
|
|
||||||
STRIP_BINARY_RETVAL=0
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
stripped=""
|
stripped=""
|
||||||
for arch in $binary_archs; do
|
for arch in $archs; do
|
||||||
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
|
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
|
||||||
# Strip non-valid architectures in-place
|
# Strip non-valid architectures in-place
|
||||||
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
|
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
|
||||||
@ -129,7 +98,6 @@ strip_invalid_archs() {
|
|||||||
if [[ "$stripped" ]]; then
|
if [[ "$stripped" ]]; then
|
||||||
echo "Stripped $binary of architectures:$stripped"
|
echo "Stripped $binary of architectures:$stripped"
|
||||||
fi
|
fi
|
||||||
STRIP_BINARY_RETVAL=1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
|
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Expecta" "${PODS_CONFIGURATION_BUILD_DIR}/Specta" "${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking" "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/CodFis-Helper" "${PODS_CONFIGURATION_BUILD_DIR}/DDDKeychainWrapper" "${PODS_CONFIGURATION_BUILD_DIR}/DJLocalization" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKShareKit" "${PODS_CONFIGURATION_BUILD_DIR}/NSDataAES" "${PODS_CONFIGURATION_BUILD_DIR}/NSDate_Utils" "${PODS_CONFIGURATION_BUILD_DIR}/NSString-Helper" "${PODS_CONFIGURATION_BUILD_DIR}/PEAR-FileManager-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PNObject" "${PODS_CONFIGURATION_BUILD_DIR}/PureLayout" "${PODS_CONFIGURATION_BUILD_DIR}/RZDataBinding" "${PODS_CONFIGURATION_BUILD_DIR}/StrongestPasswordValidator" "${PODS_CONFIGURATION_BUILD_DIR}/UIDevice-Utils" "${PODS_CONFIGURATION_BUILD_DIR}/nv-ios-http-status"
|
LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Expecta" "$PODS_CONFIGURATION_BUILD_DIR/Specta" "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/Bolts" "$PODS_CONFIGURATION_BUILD_DIR/CodFis-Helper" "$PODS_CONFIGURATION_BUILD_DIR/DDDKeychainWrapper" "$PODS_CONFIGURATION_BUILD_DIR/DJLocalization" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKShareKit" "$PODS_CONFIGURATION_BUILD_DIR/NSDataAES" "$PODS_CONFIGURATION_BUILD_DIR/NSDate_Utils" "$PODS_CONFIGURATION_BUILD_DIR/NSString-Helper" "$PODS_CONFIGURATION_BUILD_DIR/PEAR-FileManager-iOS" "$PODS_CONFIGURATION_BUILD_DIR/PNObject" "$PODS_CONFIGURATION_BUILD_DIR/PureLayout" "$PODS_CONFIGURATION_BUILD_DIR/RZDataBinding" "$PODS_CONFIGURATION_BUILD_DIR/StrongestPasswordValidator" "$PODS_CONFIGURATION_BUILD_DIR/UIDevice-Utils" "$PODS_CONFIGURATION_BUILD_DIR/nv-ios-http-status"
|
||||||
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/Bolts" -isystem "${PODS_ROOT}/Headers/Public/CodFis-Helper" -isystem "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" -isystem "${PODS_ROOT}/Headers/Public/DJLocalization" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKShareKit" -isystem "${PODS_ROOT}/Headers/Public/NSDataAES" -isystem "${PODS_ROOT}/Headers/Public/NSDate_Utils" -isystem "${PODS_ROOT}/Headers/Public/NSString-Helper" -isystem "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" -isystem "${PODS_ROOT}/Headers/Public/PNObject" -isystem "${PODS_ROOT}/Headers/Public/PureLayout" -isystem "${PODS_ROOT}/Headers/Public/RZDataBinding" -isystem "${PODS_ROOT}/Headers/Public/Specta" -isystem "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" -isystem "${PODS_ROOT}/Headers/Public/UIDevice-Utils" -isystem "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/Bolts" -isystem "${PODS_ROOT}/Headers/Public/CodFis-Helper" -isystem "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" -isystem "${PODS_ROOT}/Headers/Public/DJLocalization" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKShareKit" -isystem "${PODS_ROOT}/Headers/Public/NSDataAES" -isystem "${PODS_ROOT}/Headers/Public/NSDate_Utils" -isystem "${PODS_ROOT}/Headers/Public/NSString-Helper" -isystem "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" -isystem "${PODS_ROOT}/Headers/Public/PNObject" -isystem "${PODS_ROOT}/Headers/Public/PureLayout" -isystem "${PODS_ROOT}/Headers/Public/RZDataBinding" -isystem "${PODS_ROOT}/Headers/Public/Specta" -isystem "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" -isystem "${PODS_ROOT}/Headers/Public/UIDevice-Utils" -isystem "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
OTHER_LDFLAGS = $(inherited) -ObjC -l"Expecta" -l"Specta" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "XCTest" -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
OTHER_LDFLAGS = $(inherited) -ObjC -l"Expecta" -l"Specta" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "XCTest" -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
||||||
PODS_ROOT = ${SRCROOT}/Pods
|
PODS_ROOT = ${SRCROOT}/Pods
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Expecta" "${PODS_CONFIGURATION_BUILD_DIR}/Specta" "${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking" "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/CodFis-Helper" "${PODS_CONFIGURATION_BUILD_DIR}/DDDKeychainWrapper" "${PODS_CONFIGURATION_BUILD_DIR}/DJLocalization" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKShareKit" "${PODS_CONFIGURATION_BUILD_DIR}/NSDataAES" "${PODS_CONFIGURATION_BUILD_DIR}/NSDate_Utils" "${PODS_CONFIGURATION_BUILD_DIR}/NSString-Helper" "${PODS_CONFIGURATION_BUILD_DIR}/PEAR-FileManager-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/PNObject" "${PODS_CONFIGURATION_BUILD_DIR}/PureLayout" "${PODS_CONFIGURATION_BUILD_DIR}/RZDataBinding" "${PODS_CONFIGURATION_BUILD_DIR}/StrongestPasswordValidator" "${PODS_CONFIGURATION_BUILD_DIR}/UIDevice-Utils" "${PODS_CONFIGURATION_BUILD_DIR}/nv-ios-http-status"
|
LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Expecta" "$PODS_CONFIGURATION_BUILD_DIR/Specta" "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/Bolts" "$PODS_CONFIGURATION_BUILD_DIR/CodFis-Helper" "$PODS_CONFIGURATION_BUILD_DIR/DDDKeychainWrapper" "$PODS_CONFIGURATION_BUILD_DIR/DJLocalization" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKShareKit" "$PODS_CONFIGURATION_BUILD_DIR/NSDataAES" "$PODS_CONFIGURATION_BUILD_DIR/NSDate_Utils" "$PODS_CONFIGURATION_BUILD_DIR/NSString-Helper" "$PODS_CONFIGURATION_BUILD_DIR/PEAR-FileManager-iOS" "$PODS_CONFIGURATION_BUILD_DIR/PNObject" "$PODS_CONFIGURATION_BUILD_DIR/PureLayout" "$PODS_CONFIGURATION_BUILD_DIR/RZDataBinding" "$PODS_CONFIGURATION_BUILD_DIR/StrongestPasswordValidator" "$PODS_CONFIGURATION_BUILD_DIR/UIDevice-Utils" "$PODS_CONFIGURATION_BUILD_DIR/nv-ios-http-status"
|
||||||
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/Bolts" -isystem "${PODS_ROOT}/Headers/Public/CodFis-Helper" -isystem "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" -isystem "${PODS_ROOT}/Headers/Public/DJLocalization" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKShareKit" -isystem "${PODS_ROOT}/Headers/Public/NSDataAES" -isystem "${PODS_ROOT}/Headers/Public/NSDate_Utils" -isystem "${PODS_ROOT}/Headers/Public/NSString-Helper" -isystem "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" -isystem "${PODS_ROOT}/Headers/Public/PNObject" -isystem "${PODS_ROOT}/Headers/Public/PureLayout" -isystem "${PODS_ROOT}/Headers/Public/RZDataBinding" -isystem "${PODS_ROOT}/Headers/Public/Specta" -isystem "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" -isystem "${PODS_ROOT}/Headers/Public/UIDevice-Utils" -isystem "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/Bolts" -isystem "${PODS_ROOT}/Headers/Public/CodFis-Helper" -isystem "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" -isystem "${PODS_ROOT}/Headers/Public/DJLocalization" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" -isystem "${PODS_ROOT}/Headers/Public/FBSDKShareKit" -isystem "${PODS_ROOT}/Headers/Public/NSDataAES" -isystem "${PODS_ROOT}/Headers/Public/NSDate_Utils" -isystem "${PODS_ROOT}/Headers/Public/NSString-Helper" -isystem "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" -isystem "${PODS_ROOT}/Headers/Public/PNObject" -isystem "${PODS_ROOT}/Headers/Public/PureLayout" -isystem "${PODS_ROOT}/Headers/Public/RZDataBinding" -isystem "${PODS_ROOT}/Headers/Public/Specta" -isystem "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" -isystem "${PODS_ROOT}/Headers/Public/UIDevice-Utils" -isystem "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
OTHER_LDFLAGS = $(inherited) -ObjC -l"Expecta" -l"Specta" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "XCTest" -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
OTHER_LDFLAGS = $(inherited) -ObjC -l"Expecta" -l"Specta" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -framework "XCTest" -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
||||||
PODS_ROOT = ${SRCROOT}/Pods
|
PODS_ROOT = ${SRCROOT}/Pods
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PureLayout
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/PureLayout
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PureLayout" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PureLayout" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/PureLayout
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/PureLayout
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RZDataBinding
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/RZDataBinding
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/RZDataBinding" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/RZDataBinding" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/RZDataBinding
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/RZDataBinding
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Specta
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Specta
|
||||||
ENABLE_BITCODE = NO
|
ENABLE_BITCODE = NO
|
||||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Specta" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Specta" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
OTHER_LDFLAGS = -framework "Foundation" -framework "XCTest"
|
OTHER_LDFLAGS = -framework "Foundation" -framework "XCTest"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Specta
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Specta
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/StrongestPasswordValidator
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/StrongestPasswordValidator
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
OTHER_LDFLAGS = -framework "UIKit"
|
OTHER_LDFLAGS = -framework "UIKit"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/StrongestPasswordValidator
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/StrongestPasswordValidator
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/UIDevice-Utils
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/UIDevice-Utils
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/UIDevice-Utils" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/UIDevice-Utils" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/UIDevice-Utils
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/UIDevice-Utils
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/nv-ios-http-status
|
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/nv-ios-http-status
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/nv-ios-http-status" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/nv-ios-http-status" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = $BUILD_DIR
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/nv-ios-http-status
|
PODS_TARGET_SRCROOT = ${PODS_ROOT}/nv-ios-http-status
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||||
|
|||||||
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
Erica Sadun, http://ericasadun.com
|
||||||
|
iPhone Developer's Cookbook, 6.x Edition
|
||||||
|
BSD License, Use at your own risk
|
||||||
|
|
||||||
|
Modified by Eric Horacek for Monospace Ltd. on 2/4/13
|
||||||
|
*/
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
#define IS_IPAD (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad)
|
#define IS_IPAD (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad)
|
||||||
@ -18,7 +26,6 @@ typedef NS_ENUM(NSUInteger, UIDeviceFamily) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef NS_ENUM(NSUInteger, UIDeviceGenerationModel) {
|
typedef NS_ENUM(NSUInteger, UIDeviceGenerationModel) {
|
||||||
UIDeviceGenerationModeliPhone1G,
|
|
||||||
UIDeviceGenerationModeliPhone3G,
|
UIDeviceGenerationModeliPhone3G,
|
||||||
UIDeviceGenerationModeliPhone3GS,
|
UIDeviceGenerationModeliPhone3GS,
|
||||||
UIDeviceGenerationModeliPhone4,
|
UIDeviceGenerationModeliPhone4,
|
||||||
@ -30,27 +37,18 @@ typedef NS_ENUM(NSUInteger, UIDeviceGenerationModel) {
|
|||||||
UIDeviceGenerationModeliPhone6Plus,
|
UIDeviceGenerationModeliPhone6Plus,
|
||||||
UIDeviceGenerationModeliPhone6S,
|
UIDeviceGenerationModeliPhone6S,
|
||||||
UIDeviceGenerationModeliPhone6SPlus,
|
UIDeviceGenerationModeliPhone6SPlus,
|
||||||
UIDeviceGenerationModeliPhoneSE,
|
|
||||||
UIDeviceGenerationModeliPhone7,
|
|
||||||
UIDeviceGenerationModeliPhone7Plus,
|
|
||||||
UIDeviceGenerationModeliPhone8,
|
|
||||||
UIDeviceGenerationModeliPhone8Plus,
|
|
||||||
UIDeviceGenerationModeliPhoneX,
|
|
||||||
UIDeviceGenerationModeliPhoneSimulator,
|
UIDeviceGenerationModeliPhoneSimulator,
|
||||||
UIDeviceGenerationModeliPad1,
|
UIDeviceGenerationModeliPad1,
|
||||||
UIDeviceGenerationModeliPad2,
|
UIDeviceGenerationModeliPad2,
|
||||||
UIDeviceGenerationModeliPad3,
|
UIDeviceGenerationModeliPad3,
|
||||||
UIDeviceGenerationModeliPad4,
|
UIDeviceGenerationModeliPad4,
|
||||||
UIDeviceGenerationModeliPad5,
|
|
||||||
UIDeviceGenerationModeliPadAir,
|
UIDeviceGenerationModeliPadAir,
|
||||||
UIDeviceGenerationModeliPadAir2,
|
UIDeviceGenerationModeliPadAir2,
|
||||||
UIDeviceGenerationModeliPadMini1,
|
UIDeviceGenerationModeliPadMini1,
|
||||||
UIDeviceGenerationModeliPadMini2,
|
UIDeviceGenerationModeliPadMini2,
|
||||||
UIDeviceGenerationModeliPadMini3,
|
UIDeviceGenerationModeliPadMini3,
|
||||||
UIDeviceGenerationModeliPadMini4,
|
UIDeviceGenerationModeliPadMini4,
|
||||||
UIDeviceGenerationModeliPadPro97,
|
UIDeviceGenerationModeliPadPro,
|
||||||
UIDeviceGenerationModeliPadPro105,
|
|
||||||
UIDeviceGenerationModeliPadPro12,
|
|
||||||
UIDeviceGenerationModeliPadSimulator,
|
UIDeviceGenerationModeliPadSimulator,
|
||||||
UIDeviceGenerationModeliPod1,
|
UIDeviceGenerationModeliPod1,
|
||||||
UIDeviceGenerationModeliPod2,
|
UIDeviceGenerationModeliPod2,
|
||||||
@ -72,19 +70,15 @@ typedef NS_ENUM(NSUInteger, UIDeviceModelInches) {
|
|||||||
UIDeviceModelInches4,
|
UIDeviceModelInches4,
|
||||||
UIDeviceModelInches47,
|
UIDeviceModelInches47,
|
||||||
UIDeviceModelInches55,
|
UIDeviceModelInches55,
|
||||||
UIDeviceModelInches58,
|
|
||||||
UIDeviceModelInches79,
|
UIDeviceModelInches79,
|
||||||
UIDeviceModelInches97,
|
UIDeviceModelInches97,
|
||||||
UIDeviceModelInches105,
|
|
||||||
UIDeviceModelInches129,
|
UIDeviceModelInches129,
|
||||||
UIDeviceSimulatorModelInches35 = UIDeviceModelInches35,
|
UIDeviceSimulatorModelInches35 = UIDeviceModelInches35,
|
||||||
UIDeviceSimulatorModelInches4 = UIDeviceModelInches4,
|
UIDeviceSimulatorModelInches4 = UIDeviceModelInches4,
|
||||||
UIDeviceSimulatorModelInches47 = UIDeviceModelInches47,
|
UIDeviceSimulatorModelInches47 = UIDeviceModelInches47,
|
||||||
UIDeviceSimulatorModelInches55 = UIDeviceModelInches55,
|
UIDeviceSimulatorModelInches55 = UIDeviceModelInches55,
|
||||||
UIDeviceSimulatorModelInches58 = UIDeviceModelInches58,
|
|
||||||
UIDeviceSimulatorModelInches79 = UIDeviceModelInches79,
|
UIDeviceSimulatorModelInches79 = UIDeviceModelInches79,
|
||||||
UIDeviceSimulatorModelInches97 = UIDeviceModelInches97,
|
UIDeviceSimulatorModelInches97 = UIDeviceModelInches97,
|
||||||
UIDeviceSimulatorModelInches105 = UIDeviceModelInches105,
|
|
||||||
UIDeviceSimulatorModelInches129 = UIDeviceModelInches129,
|
UIDeviceSimulatorModelInches129 = UIDeviceModelInches129,
|
||||||
UIDeviceModelInchesUnKnown
|
UIDeviceModelInchesUnKnown
|
||||||
};
|
};
|
||||||
@ -97,6 +91,11 @@ typedef NS_ENUM(NSUInteger, UIDeviceModelInches) {
|
|||||||
*/
|
*/
|
||||||
- (NSString *)modelIdentifier;
|
- (NSString *)modelIdentifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns a human-readable model name in the format of "iPhone 4S". Fallback of the the `modelIdentifier` value.
|
||||||
|
*/
|
||||||
|
- (NSString *)modelName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the device generation model as a `UIDeviceGenerationModel`
|
Returns the device generation model as a `UIDeviceGenerationModel`
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
Erica Sadun, http://ericasadun.com
|
||||||
|
iPhone Developer's Cookbook, 6.x Edition
|
||||||
|
BSD License, Use at your own risk
|
||||||
|
|
||||||
|
Modified by Eric Horacek for Monospace Ltd. on 2/4/13
|
||||||
|
*/
|
||||||
|
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#import "UIDevice-Hardware.h"
|
#import "UIDevice-Hardware.h"
|
||||||
|
|
||||||
@ -28,9 +36,94 @@
|
|||||||
return [self getSysInfoByName:"hw.machine"];
|
return [self getSysInfoByName:"hw.machine"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *)modelName
|
||||||
|
{
|
||||||
|
return [self modelNameForModelIdentifier:[self modelIdentifier]];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *)modelNameForModelIdentifier:(NSString *)modelIdentifier
|
||||||
|
{
|
||||||
|
// iPhone http://theiphonewiki.com/wiki/IPhone
|
||||||
|
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone1,1"]) return @"iPhone 1G";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone1,2"]) return @"iPhone 3G";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone2,1"]) return @"iPhone 3GS";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone3,1"]) return @"iPhone 4 (GSM)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone3,2"]) return @"iPhone 4 (GSM Rev A)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone3,3"]) return @"iPhone 4 (CDMA)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone4,1"]) return @"iPhone 4S";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone5,1"]) return @"iPhone 5 (GSM)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone5,2"]) return @"iPhone 5 (Global)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone5,3"]) return @"iPhone 5c (GSM)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone5,4"]) return @"iPhone 5c (Global)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone6,1"]) return @"iPhone 5s (GSM)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone6,2"]) return @"iPhone 5s (Global)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone7,1"]) return @"iPhone 6 Plus";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone7,2"]) return @"iPhone 6";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone8,1"]) return @"iPhone 6s";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPhone8,2"]) return @"iPhone 6s Plus";
|
||||||
|
|
||||||
|
// iPad http://theiphonewiki.com/wiki/IPad
|
||||||
|
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad1,1"]) return @"iPad 1G";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad2,1"]) return @"iPad 2 (Wi-Fi)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad2,2"]) return @"iPad 2 (GSM)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad2,3"]) return @"iPad 2 (CDMA)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad2,4"]) return @"iPad 2 (Rev A)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad3,1"]) return @"iPad 3 (Wi-Fi)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad3,2"]) return @"iPad 3 (GSM)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad3,3"]) return @"iPad 3 (Global)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad3,4"]) return @"iPad 4 (Wi-Fi)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad3,5"]) return @"iPad 4 (GSM)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad3,6"]) return @"iPad 4 (Global)";
|
||||||
|
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad4,1"]) return @"iPad Air (Wi-Fi)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad4,2"]) return @"iPad Air (Cellular)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad5,3"]) return @"iPad Air 2 (Wi-Fi)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad5,4"]) return @"iPad Air 2 (Cellular)";
|
||||||
|
|
||||||
|
// iPad Mini http://theiphonewiki.com/wiki/IPad_mini
|
||||||
|
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad2,5"]) return @"iPad mini 1G (Wi-Fi)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad2,6"]) return @"iPad mini 1G (GSM)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad2,7"]) return @"iPad mini 1G (Global)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad4,4"]) return @"iPad mini 2G (Wi-Fi)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad4,5"]) return @"iPad mini 2G (Cellular)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad4,6"]) return @"iPad mini 2G (Cellular)"; // TD-LTE model see https://support.apple.com/en-us/HT201471#iPad-mini2
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad4,7"]) return @"iPad mini 3G (Wi-Fi)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad4,8"]) return @"iPad mini 3G (Cellular)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad4,9"]) return @"iPad mini 3G (Cellular)";
|
||||||
|
|
||||||
|
// iPod http://theiphonewiki.com/wiki/IPod
|
||||||
|
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPod1,1"]) return @"iPod touch 1G";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPod2,1"]) return @"iPod touch 2G";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPod3,1"]) return @"iPod touch 3G";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPod4,1"]) return @"iPod touch 4G";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPod5,1"]) return @"iPod touch 5G";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPod7,1"]) return @"iPod touch 6G"; // as 6,1 was never released 7,1 is actually 6th generation
|
||||||
|
|
||||||
|
// Apple TV https://www.theiphonewiki.com/wiki/Apple_TV
|
||||||
|
|
||||||
|
if ([modelIdentifier isEqualToString:@"AppleTV1,1"]) return @"Apple TV 1G";
|
||||||
|
if ([modelIdentifier isEqualToString:@"AppleTV2,1"]) return @"Apple TV 2G";
|
||||||
|
if ([modelIdentifier isEqualToString:@"AppleTV3,1"]) return @"Apple TV 3G";
|
||||||
|
if ([modelIdentifier isEqualToString:@"AppleTV3,2"]) return @"Apple TV 3G"; // small, incremental update over 3,1
|
||||||
|
if ([modelIdentifier isEqualToString:@"AppleTV5,3"]) return @"Apple TV 4G";
|
||||||
|
|
||||||
|
// Simulator
|
||||||
|
if ([modelIdentifier hasSuffix:@"86"] || [modelIdentifier isEqual:@"x86_64"])
|
||||||
|
{
|
||||||
|
BOOL smallerScreen = ([[UIScreen mainScreen] bounds].size.width < 768.0);
|
||||||
|
return (smallerScreen ? @"iPhone Simulator" : @"iPad Simulator");
|
||||||
|
}
|
||||||
|
|
||||||
|
return modelIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
- (UIDeviceFamily) deviceFamily
|
- (UIDeviceFamily) deviceFamily
|
||||||
{
|
{
|
||||||
NSString *modelIdentifier = [self deviceGenerationModelString];
|
NSString *modelIdentifier = [self modelNameForModelIdentifier:[self modelIdentifier]];
|
||||||
if ([modelIdentifier hasPrefix:@"iPhone"]) return UIDeviceFamilyiPhone;
|
if ([modelIdentifier hasPrefix:@"iPhone"]) return UIDeviceFamilyiPhone;
|
||||||
if ([modelIdentifier hasPrefix:@"iPod"]) return UIDeviceFamilyiPod;
|
if ([modelIdentifier hasPrefix:@"iPod"]) return UIDeviceFamilyiPod;
|
||||||
if ([modelIdentifier hasPrefix:@"iPad"]) return UIDeviceFamilyiPad;
|
if ([modelIdentifier hasPrefix:@"iPad"]) return UIDeviceFamilyiPad;
|
||||||
@ -42,9 +135,7 @@
|
|||||||
{
|
{
|
||||||
NSString *modelIdentifier = [self modelIdentifier];
|
NSString *modelIdentifier = [self modelIdentifier];
|
||||||
|
|
||||||
// iPhone https://www.theiphonewiki.com/wiki/List_of_iPhones
|
if ([modelIdentifier isEqualToString:@"iPhone1,1"]) return UIDeviceGenerationModeliPhone3G;
|
||||||
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone1,1"]) return UIDeviceGenerationModeliPhone1G;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone1,2"]) return UIDeviceGenerationModeliPhone3G;
|
if ([modelIdentifier isEqualToString:@"iPhone1,2"]) return UIDeviceGenerationModeliPhone3G;
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone2,1"]) return UIDeviceGenerationModeliPhone3GS;
|
if ([modelIdentifier isEqualToString:@"iPhone2,1"]) return UIDeviceGenerationModeliPhone3GS;
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone3,1"]) return UIDeviceGenerationModeliPhone4;
|
if ([modelIdentifier isEqualToString:@"iPhone3,1"]) return UIDeviceGenerationModeliPhone4;
|
||||||
@ -61,17 +152,6 @@
|
|||||||
if ([modelIdentifier isEqualToString:@"iPhone7,2"]) return UIDeviceGenerationModeliPhone6;
|
if ([modelIdentifier isEqualToString:@"iPhone7,2"]) return UIDeviceGenerationModeliPhone6;
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone8,1"]) return UIDeviceGenerationModeliPhone6S;
|
if ([modelIdentifier isEqualToString:@"iPhone8,1"]) return UIDeviceGenerationModeliPhone6S;
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone8,2"]) return UIDeviceGenerationModeliPhone6SPlus;
|
if ([modelIdentifier isEqualToString:@"iPhone8,2"]) return UIDeviceGenerationModeliPhone6SPlus;
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone8,4"]) return UIDeviceGenerationModeliPhoneSE;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone9,1"]) return UIDeviceGenerationModeliPhone7;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone9,2"]) return UIDeviceGenerationModeliPhone7Plus;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone9,3"]) return UIDeviceGenerationModeliPhone7;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone9,4"]) return UIDeviceGenerationModeliPhone7Plus;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone10,1"]) return UIDeviceGenerationModeliPhone8;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone10,2"]) return UIDeviceGenerationModeliPhone8Plus;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone10,3"]) return UIDeviceGenerationModeliPhoneX;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone10,4"]) return UIDeviceGenerationModeliPhone8;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone10,5"]) return UIDeviceGenerationModeliPhone8Plus;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone10,6"]) return UIDeviceGenerationModeliPhoneX;
|
|
||||||
|
|
||||||
// iPad http://theiphonewiki.com/wiki/IPad
|
// iPad http://theiphonewiki.com/wiki/IPad
|
||||||
|
|
||||||
@ -86,13 +166,13 @@
|
|||||||
if ([modelIdentifier isEqualToString:@"iPad3,4"]) return UIDeviceGenerationModeliPad4;
|
if ([modelIdentifier isEqualToString:@"iPad3,4"]) return UIDeviceGenerationModeliPad4;
|
||||||
if ([modelIdentifier isEqualToString:@"iPad3,5"]) return UIDeviceGenerationModeliPad4;
|
if ([modelIdentifier isEqualToString:@"iPad3,5"]) return UIDeviceGenerationModeliPad4;
|
||||||
if ([modelIdentifier isEqualToString:@"iPad3,6"]) return UIDeviceGenerationModeliPad4;
|
if ([modelIdentifier isEqualToString:@"iPad3,6"]) return UIDeviceGenerationModeliPad4;
|
||||||
if ([modelIdentifier isEqualToString:@"iPad6,11"]) return UIDeviceGenerationModeliPad5;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad6,12"]) return UIDeviceGenerationModeliPad5;
|
|
||||||
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad4,1"]) return UIDeviceGenerationModeliPadAir;
|
if ([modelIdentifier isEqualToString:@"iPad4,1"]) return UIDeviceGenerationModeliPadAir;
|
||||||
if ([modelIdentifier isEqualToString:@"iPad4,2"]) return UIDeviceGenerationModeliPadAir;
|
if ([modelIdentifier isEqualToString:@"iPad4,2"]) return UIDeviceGenerationModeliPadAir;
|
||||||
if ([modelIdentifier isEqualToString:@"iPad5,3"]) return UIDeviceGenerationModeliPadAir2;
|
if ([modelIdentifier isEqualToString:@"iPad5,3"]) return UIDeviceGenerationModeliPadAir2;
|
||||||
if ([modelIdentifier isEqualToString:@"iPad5,4"]) return UIDeviceGenerationModeliPadAir2;
|
if ([modelIdentifier isEqualToString:@"iPad5,4"]) return UIDeviceGenerationModeliPadAir2;
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad6,7"]) return UIDeviceGenerationModeliPadPro;
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad6,8"]) return UIDeviceGenerationModeliPadPro;
|
||||||
|
|
||||||
// iPad Mini http://theiphonewiki.com/wiki/IPad_mini
|
// iPad Mini http://theiphonewiki.com/wiki/IPad_mini
|
||||||
|
|
||||||
@ -105,19 +185,6 @@
|
|||||||
if ([modelIdentifier isEqualToString:@"iPad4,7"]) return UIDeviceGenerationModeliPadMini3;
|
if ([modelIdentifier isEqualToString:@"iPad4,7"]) return UIDeviceGenerationModeliPadMini3;
|
||||||
if ([modelIdentifier isEqualToString:@"iPad4,8"]) return UIDeviceGenerationModeliPadMini3;
|
if ([modelIdentifier isEqualToString:@"iPad4,8"]) return UIDeviceGenerationModeliPadMini3;
|
||||||
if ([modelIdentifier isEqualToString:@"iPad4,9"]) return UIDeviceGenerationModeliPadMini3;
|
if ([modelIdentifier isEqualToString:@"iPad4,9"]) return UIDeviceGenerationModeliPadMini3;
|
||||||
if ([modelIdentifier isEqualToString:@"iPad5,1"]) return UIDeviceGenerationModeliPadMini4;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad5,2"]) return UIDeviceGenerationModeliPadMini4;
|
|
||||||
|
|
||||||
// iPad Pro https://www.theiphonewiki.com/wiki/IPad_Pro
|
|
||||||
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad6,3"]) return UIDeviceGenerationModeliPadPro97; // http://pdadb.net/index.php?m=specs&id=9938&c=apple_ipad_pro_9.7-inch_a1673_wifi_32gb_apple_ipad_6,3
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad6,4"]) return UIDeviceGenerationModeliPadPro97; // http://pdadb.net/index.php?m=specs&id=9981&c=apple_ipad_pro_9.7-inch_a1675_td-lte_32gb_apple_ipad_6,4
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad6,7"]) return UIDeviceGenerationModeliPadPro12; // http://pdadb.net/index.php?m=specs&id=8960&c=apple_ipad_pro_wifi_a1584_128gb
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad6,8"]) return UIDeviceGenerationModeliPadPro12; // http://pdadb.net/index.php?m=specs&id=8965&c=apple_ipad_pro_td-lte_a1652_32gb_apple_ipad_6,8
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad 7,1"]) return UIDeviceGenerationModeliPadPro12;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad 7,2"]) return UIDeviceGenerationModeliPadPro12;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad 7,3"]) return UIDeviceGenerationModeliPadPro105;
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad 7,4"]) return UIDeviceGenerationModeliPadPro105;
|
|
||||||
|
|
||||||
// iPod http://theiphonewiki.com/wiki/IPod
|
// iPod http://theiphonewiki.com/wiki/IPod
|
||||||
|
|
||||||
@ -171,17 +238,6 @@
|
|||||||
if ([modelIdentifier isEqualToString:@"iPhone7,2"]) return @"iPhone 6";
|
if ([modelIdentifier isEqualToString:@"iPhone7,2"]) return @"iPhone 6";
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone8,1"]) return @"iPhone 6s";
|
if ([modelIdentifier isEqualToString:@"iPhone8,1"]) return @"iPhone 6s";
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone8,2"]) return @"iPhone 6s Plus";
|
if ([modelIdentifier isEqualToString:@"iPhone8,2"]) return @"iPhone 6s Plus";
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone8,4"]) return @"iPhone SE";
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone9,1"]) return @"iPhone 7";
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone9,2"]) return @"iPhone 7 Plus";
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone9,3"]) return @"iPhone 7";
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone9,4"]) return @"iPhone 7 Plus";
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone10,1"]) return @"iPhone 8"; // US (Verizon), China, Japan
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone10,2"]) return @"iPhone 8 Plus"; // US (Verizon), China, Japan
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone10,3"]) return @"iPhone X"; // US (Verizon), China, Japan
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone10,4"]) return @"iPhone 8"; // AT&T, Global
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone10,5"]) return @"iPhone 8 Plus"; // AT&T, Global
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPhone10,6"]) return @"iPhone X"; // AT&T, Global
|
|
||||||
|
|
||||||
// iPad http://theiphonewiki.com/wiki/IPad
|
// iPad http://theiphonewiki.com/wiki/IPad
|
||||||
|
|
||||||
@ -196,14 +252,15 @@
|
|||||||
if ([modelIdentifier isEqualToString:@"iPad3,4"]) return @"iPad 4 (Wi-Fi)";
|
if ([modelIdentifier isEqualToString:@"iPad3,4"]) return @"iPad 4 (Wi-Fi)";
|
||||||
if ([modelIdentifier isEqualToString:@"iPad3,5"]) return @"iPad 4 (GSM)";
|
if ([modelIdentifier isEqualToString:@"iPad3,5"]) return @"iPad 4 (GSM)";
|
||||||
if ([modelIdentifier isEqualToString:@"iPad3,6"]) return @"iPad 4 (Global)";
|
if ([modelIdentifier isEqualToString:@"iPad3,6"]) return @"iPad 4 (Global)";
|
||||||
if ([modelIdentifier isEqualToString:@"iPad6,11"]) return @"iPad (5th gen) (Wi-Fi)";
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad6,12"]) return @"iPad (5th gen) (Cellular)";
|
|
||||||
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad4,1"]) return @"iPad Air (Wi-Fi)";
|
if ([modelIdentifier isEqualToString:@"iPad4,1"]) return @"iPad Air (Wi-Fi)";
|
||||||
if ([modelIdentifier isEqualToString:@"iPad4,2"]) return @"iPad Air (Cellular)";
|
if ([modelIdentifier isEqualToString:@"iPad4,2"]) return @"iPad Air (Cellular)";
|
||||||
if ([modelIdentifier isEqualToString:@"iPad5,3"]) return @"iPad Air 2 (Wi-Fi)";
|
if ([modelIdentifier isEqualToString:@"iPad5,3"]) return @"iPad Air 2 (Wi-Fi)";
|
||||||
if ([modelIdentifier isEqualToString:@"iPad5,4"]) return @"iPad Air 2 (Cellular)";
|
if ([modelIdentifier isEqualToString:@"iPad5,4"]) return @"iPad Air 2 (Cellular)";
|
||||||
|
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad6,7"]) return @"iPad Pro (Wi-Fi)";
|
||||||
|
if ([modelIdentifier isEqualToString:@"iPad6,8"]) return @"iPad Pro (Cellular)";
|
||||||
|
|
||||||
// iPad Mini http://theiphonewiki.com/wiki/IPad_mini
|
// iPad Mini http://theiphonewiki.com/wiki/IPad_mini
|
||||||
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad2,5"]) return @"iPad mini 1G (Wi-Fi)";
|
if ([modelIdentifier isEqualToString:@"iPad2,5"]) return @"iPad mini 1G (Wi-Fi)";
|
||||||
@ -215,19 +272,6 @@
|
|||||||
if ([modelIdentifier isEqualToString:@"iPad4,7"]) return @"iPad mini 3G (Wi-Fi)";
|
if ([modelIdentifier isEqualToString:@"iPad4,7"]) return @"iPad mini 3G (Wi-Fi)";
|
||||||
if ([modelIdentifier isEqualToString:@"iPad4,8"]) return @"iPad mini 3G (Cellular)";
|
if ([modelIdentifier isEqualToString:@"iPad4,8"]) return @"iPad mini 3G (Cellular)";
|
||||||
if ([modelIdentifier isEqualToString:@"iPad4,9"]) return @"iPad mini 3G (Cellular)";
|
if ([modelIdentifier isEqualToString:@"iPad4,9"]) return @"iPad mini 3G (Cellular)";
|
||||||
if ([modelIdentifier isEqualToString:@"iPad5,1"]) return @"iPad mini 4G (Wi-Fi)";
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad5,2"]) return @"iPad mini 4G (Cellular)";
|
|
||||||
|
|
||||||
// iPad Pro https://www.theiphonewiki.com/wiki/IPad_Pro
|
|
||||||
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad6,3"]) return @"iPad Pro (9.7 inch) 1G (Wi-Fi)"; // http://pdadb.net/index.php?m=specs&id=9938&c=apple_ipad_pro_9.7-inch_a1673_wifi_32gb_apple_ipad_6,3
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad6,4"]) return @"iPad Pro (9.7 inch) 1G (Cellular)"; // http://pdadb.net/index.php?m=specs&id=9981&c=apple_ipad_pro_9.7-inch_a1675_td-lte_32gb_apple_ipad_6,4
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad6,7"]) return @"iPad Pro (12.9 inch) 1G (Wi-Fi)"; // http://pdadb.net/index.php?m=specs&id=8960&c=apple_ipad_pro_wifi_a1584_128gb
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad6,8"]) return @"iPad Pro (12.9 inch) 1G (Cellular)"; // http://pdadb.net/index.php?m=specs&id=8965&c=apple_ipad_pro_td-lte_a1652_32gb_apple_ipad_6,8
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad 7,1"]) return @"iPad Pro (12.9 inch) 2G (Wi-Fi)";
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad 7,2"]) return @"iPad Pro (12.9 inch) 2G (Cellular)";
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad 7,3"]) return @"iPad Pro (10.5 inch) 1G (Wi-Fi)";
|
|
||||||
if ([modelIdentifier isEqualToString:@"iPad 7,4"]) return @"iPad Pro (10.5 inch) 1G (Cellular)";
|
|
||||||
|
|
||||||
// iPod http://theiphonewiki.com/wiki/IPod
|
// iPod http://theiphonewiki.com/wiki/IPod
|
||||||
|
|
||||||
@ -267,37 +311,26 @@
|
|||||||
break;
|
break;
|
||||||
case UIDeviceGenerationModeliPhone5:
|
case UIDeviceGenerationModeliPhone5:
|
||||||
case UIDeviceGenerationModeliPhone5C:
|
case UIDeviceGenerationModeliPhone5C:
|
||||||
case UIDeviceGenerationModeliPhone5S:
|
case UIDeviceGenerationModeliPhone5S:{
|
||||||
case UIDeviceGenerationModeliPhoneSE:{
|
|
||||||
return UIDeviceModelInches4;
|
return UIDeviceModelInches4;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case UIDeviceGenerationModeliPhone6:
|
case UIDeviceGenerationModeliPhone6:
|
||||||
case UIDeviceGenerationModeliPhone6S:
|
case UIDeviceGenerationModeliPhone6S:{
|
||||||
case UIDeviceGenerationModeliPhone7:
|
|
||||||
case UIDeviceGenerationModeliPhone8:{
|
|
||||||
return UIDeviceModelInches47;
|
return UIDeviceModelInches47;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case UIDeviceGenerationModeliPhone6Plus:
|
case UIDeviceGenerationModeliPhone6Plus:
|
||||||
case UIDeviceGenerationModeliPhone6SPlus:
|
case UIDeviceGenerationModeliPhone6SPlus:{
|
||||||
case UIDeviceGenerationModeliPhone7Plus:
|
|
||||||
case UIDeviceGenerationModeliPhone8Plus:{
|
|
||||||
return UIDeviceModelInches55;
|
return UIDeviceModelInches55;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case UIDeviceGenerationModeliPhoneX:{
|
|
||||||
return UIDeviceModelInches58;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case UIDeviceGenerationModeliPad1:
|
case UIDeviceGenerationModeliPad1:
|
||||||
case UIDeviceGenerationModeliPad2:
|
case UIDeviceGenerationModeliPad2:
|
||||||
case UIDeviceGenerationModeliPad3:
|
case UIDeviceGenerationModeliPad3:
|
||||||
case UIDeviceGenerationModeliPad4:
|
case UIDeviceGenerationModeliPad4:
|
||||||
case UIDeviceGenerationModeliPad5:
|
|
||||||
case UIDeviceGenerationModeliPadAir:
|
case UIDeviceGenerationModeliPadAir:
|
||||||
case UIDeviceGenerationModeliPadAir2:
|
case UIDeviceGenerationModeliPadAir2:{
|
||||||
case UIDeviceGenerationModeliPadPro97:{
|
|
||||||
return UIDeviceModelInches97;
|
return UIDeviceModelInches97;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -308,19 +341,16 @@
|
|||||||
return UIDeviceModelInches79;
|
return UIDeviceModelInches79;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case UIDeviceGenerationModeliPadPro105:{
|
case UIDeviceGenerationModeliPadPro:{
|
||||||
return UIDeviceModelInches105;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case UIDeviceGenerationModeliPadPro12:{
|
|
||||||
return UIDeviceModelInches129;
|
return UIDeviceModelInches129;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case UIDeviceGenerationModeliPadSimulator:
|
case UIDeviceGenerationModeliPadSimulator:
|
||||||
case UIDeviceGenerationModeliPhoneSimulator:{
|
case UIDeviceGenerationModeliPhoneSimulator:{
|
||||||
CGRect screenRect = [[UIScreen mainScreen] bounds];
|
CGRect screenRect = [[UIScreen mainScreen] bounds];
|
||||||
NSInteger screenHeight = ((NSInteger)screenRect.size.height > (NSInteger)screenRect.size.width) ? (NSInteger)screenRect.size.height : (NSInteger)screenRect.size.width;
|
NSInteger screenHeight = ((NSInteger)screenRect.size.height > (NSInteger)screenRect.size.width) ? (NSInteger)screenRect.size.height : (NSInteger)screenRect.size.width;
|
||||||
|
|
||||||
|
|
||||||
switch (screenHeight) {
|
switch (screenHeight) {
|
||||||
case 480:{
|
case 480:{
|
||||||
return UIDeviceSimulatorModelInches35;
|
return UIDeviceSimulatorModelInches35;
|
||||||
@ -338,11 +368,6 @@
|
|||||||
return UIDeviceSimulatorModelInches55;
|
return UIDeviceSimulatorModelInches55;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 812:{
|
|
||||||
return UIDeviceSimulatorModelInches58;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1024:{
|
case 1024:{
|
||||||
return UIDeviceModelInches97;
|
return UIDeviceModelInches97;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = 'PNObject'
|
s.name = 'PNObject'
|
||||||
s.version = '2.4.5'
|
s.version = '1.3.4'
|
||||||
s.summary = 'PNObject is a simple replica of the more complex ParseObject'
|
s.summary = 'PNObject is a simple replica of the more complex ParseObject'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -59,18 +59,6 @@
|
|||||||
withBlockSuccess:(nullable void (^)(PNUser * _Nullable responseObject))success
|
withBlockSuccess:(nullable void (^)(PNUser * _Nullable responseObject))success
|
||||||
failure:(nullable void (^)(NSError * _Nonnull error))failure;
|
failure:(nullable void (^)(NSError * _Nonnull error))failure;
|
||||||
|
|
||||||
/**
|
|
||||||
* <#Description#>
|
|
||||||
*
|
|
||||||
* @param username username description
|
|
||||||
* @param password <#password description#>
|
|
||||||
* @param success <#success description#>
|
|
||||||
* @param failure <#failure description#>
|
|
||||||
*/
|
|
||||||
+ (void) loginCurrentUserWithUsername:(NSString * _Nonnull) username
|
|
||||||
password:(NSString * _Nonnull) password
|
|
||||||
withBlockSuccess:(nullable void (^)(PNUser * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <#Description#>
|
* <#Description#>
|
||||||
|
|||||||
@ -390,38 +390,6 @@ static bool isFirstAccess = YES;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void) loginCurrentUserWithUsername:(NSString * _Nonnull) username
|
|
||||||
password:(NSString * _Nonnull) password
|
|
||||||
withBlockSuccess:(nullable void (^)(PNUser * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSError * _Nonnull error))failure {
|
|
||||||
|
|
||||||
[[PNObjectConfig sharedInstance] refreshTokenForUserWithUsername:username password:password withBlockSuccess:^(BOOL refreshSuccess) {
|
|
||||||
if (refreshSuccess) {
|
|
||||||
|
|
||||||
PNUser *user = [[self class] new];
|
|
||||||
|
|
||||||
PNObjcPassword *objectPassword = [PNObjcPassword new];
|
|
||||||
[objectPassword setPassword:password];
|
|
||||||
[objectPassword setConfirmPassword:password];
|
|
||||||
|
|
||||||
[user setAuthenticated:YES];
|
|
||||||
[user setUsername:username];
|
|
||||||
[user setPassword:objectPassword];
|
|
||||||
[user saveLocally];
|
|
||||||
[user reloadFormServer];
|
|
||||||
|
|
||||||
USER = user;
|
|
||||||
|
|
||||||
if (success) {
|
|
||||||
success(user);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} failure:failure];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+ (void) uploadAvatar:(UIImage * _Nonnull) avatar
|
+ (void) uploadAvatar:(UIImage * _Nonnull) avatar
|
||||||
Progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
Progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
||||||
Success:(nullable void (^)(NSDictionary * _Nullable responseObject))success
|
Success:(nullable void (^)(NSDictionary * _Nullable responseObject))success
|
||||||
|
|||||||
@ -7,14 +7,70 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "PNObject.h"
|
#import "PNObject.h"
|
||||||
#import "PNObject+PNObjectGETConnection.h"
|
#import "PNObjectFormData.h"
|
||||||
#import "PNObject+PNObjectPOSTConnection.h"
|
|
||||||
#import "PNObject+PNObjectDELETEConnection.h"
|
|
||||||
|
|
||||||
#define MAX_RETRIES 3
|
|
||||||
|
|
||||||
@interface PNObject (PNObjectConnection)
|
@interface PNObject (PNObjectConnection)
|
||||||
|
|
||||||
|
|
||||||
|
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
||||||
|
|
||||||
|
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
||||||
|
|
||||||
|
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
retries:(NSInteger) retries
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
||||||
|
|
||||||
|
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nullable uploadProgress)) uploadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
||||||
|
|
||||||
|
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
retries:(NSInteger) retries
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
||||||
|
|
||||||
|
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
formData:(NSArray * _Nullable) postFormData
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
||||||
|
|
||||||
|
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
formData:(NSArray * _Nullable) postFormData
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
retries:(NSInteger) retries
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
||||||
|
|
||||||
|
+ (void) DELETEWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
||||||
|
|
||||||
|
+ (void) DELETEWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
retries:(NSInteger) retries
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
||||||
|
|
||||||
+ (id _Nonnull) parseObjectFromResponse:(id _Nullable) response;
|
+ (id _Nonnull) parseObjectFromResponse:(id _Nullable) response;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -14,8 +14,249 @@
|
|||||||
#import <AFNetworking/AFNetworking.h>
|
#import <AFNetworking/AFNetworking.h>
|
||||||
#import "PNObject+Protected.h"
|
#import "PNObject+Protected.h"
|
||||||
|
|
||||||
|
#define MAX_RETRIES 3
|
||||||
|
|
||||||
@implementation PNObject (PNObjectConnection)
|
@implementation PNObject (PNObjectConnection)
|
||||||
|
|
||||||
|
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nonnull downloadProgress)) downloadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
||||||
|
|
||||||
|
return [self GETWithEndpointAction:endPoint parameters:nil progress:downloadProgress success:success failure:failure];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
||||||
|
|
||||||
|
return [self GETWithEndpointAction:endPoint parameters:parameters retries:MAX_RETRIES progress:downloadProgress success:success failure:failure];
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
retries:(NSInteger) retries
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
||||||
|
|
||||||
|
if ([[PNObjectConfig sharedInstance] currentOauthCredential] && ![[[PNObjectConfig sharedInstance] currentOauthCredential] isExpired]) {
|
||||||
|
[[[PNObjectConfig sharedInstance] manager] GET:[[[PNObjectConfig sharedInstance] endPointUrl] stringByAppendingFormat:@"%@",endPoint] parameters:parameters progress:downloadProgress success:^(NSURLSessionDataTask *task, id responseObject) {
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
success(task,responseObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||||
|
if (retries > 0) {
|
||||||
|
[[PNObjectConfig sharedInstance] refreshTokenWithBlockSuccess:^(BOOL refreshSuccess) {
|
||||||
|
|
||||||
|
return [self GETWithEndpointAction:endPoint parameters:parameters retries:retries-1 progress:downloadProgress success:success failure:failure];
|
||||||
|
} failure:^(NSError * _Nonnull error) {
|
||||||
|
if (failure) {
|
||||||
|
failure(nil,error);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
return;
|
||||||
|
}else {
|
||||||
|
if (failure) {
|
||||||
|
failure(task,error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[[PNObjectConfig sharedInstance] refreshTokenWithBlockSuccess:^(BOOL refreshSuccess) {
|
||||||
|
|
||||||
|
return [self GETWithEndpointAction:endPoint parameters:parameters retries:retries-1 progress:downloadProgress success:success failure:failure];
|
||||||
|
} failure:^(NSError * _Nonnull error) {
|
||||||
|
if (failure) {
|
||||||
|
failure(nil,error);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
||||||
|
return [self POSTWithEndpointAction:endPoint parameters:parameters retries:MAX_RETRIES progress:uploadProgress success:success failure:failure];
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
retries:(NSInteger) retries
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
||||||
|
|
||||||
|
if ([[PNObjectConfig sharedInstance] currentOauthCredential] && ![[[PNObjectConfig sharedInstance] currentOauthCredential] isExpired]) {
|
||||||
|
|
||||||
|
[[[PNObjectConfig sharedInstance] manager] POST:[[[PNObjectConfig sharedInstance] endPointUrl] stringByAppendingFormat:@"%@",endPoint] parameters:parameters progress:uploadProgress success:^(NSURLSessionDataTask *task, id responseObject) {
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
success(task,responseObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||||
|
if (retries > 0) {
|
||||||
|
[[PNObjectConfig sharedInstance] refreshTokenWithBlockSuccess:^(BOOL refreshSuccess) {
|
||||||
|
|
||||||
|
return [self POSTWithEndpointAction:endPoint parameters:parameters retries:retries-1 progress:uploadProgress success:success failure:failure];
|
||||||
|
} failure:^(NSError * _Nonnull error) {
|
||||||
|
|
||||||
|
if (failure) {
|
||||||
|
failure(nil,error);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (failure) {
|
||||||
|
failure(task, error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[[PNObjectConfig sharedInstance] refreshTokenWithBlockSuccess:^(BOOL refreshSuccess) {
|
||||||
|
|
||||||
|
return [self POSTWithEndpointAction:endPoint parameters:parameters retries:retries-1 progress:uploadProgress success:success failure:failure];
|
||||||
|
} failure:^(NSError * _Nonnull error) {
|
||||||
|
|
||||||
|
if (failure) {
|
||||||
|
failure(nil,error);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
formData:(NSArray * _Nullable) postFormData
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
||||||
|
|
||||||
|
return [self POSTWithEndpointAction:endPoint formData:postFormData parameters:parameters retries:MAX_RETRIES progress:uploadProgress success:success failure:failure];
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
formData:(NSArray * _Nullable) postFormData
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
retries:(NSInteger) retries
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
||||||
|
|
||||||
|
if ([[PNObjectConfig sharedInstance] currentOauthCredential] && ![[[PNObjectConfig sharedInstance] currentOauthCredential] isExpired]) {
|
||||||
|
[[[PNObjectConfig sharedInstance] manager] POST:[[[PNObjectConfig sharedInstance] endPointUrl] stringByAppendingFormat:@"%@",endPoint]
|
||||||
|
parameters:parameters
|
||||||
|
constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) {
|
||||||
|
if (postFormData) {
|
||||||
|
for (PNObjectFormData *postData in postFormData) {
|
||||||
|
|
||||||
|
[formData appendPartWithFileData:[postData formData] name:[postData name] fileName:[postData fileName] mimeType:[postData mimeType]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
progress:uploadProgress
|
||||||
|
success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||||
|
if (success) {
|
||||||
|
success(task,responseObject);
|
||||||
|
}
|
||||||
|
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||||
|
if (retries > 0) {
|
||||||
|
[[PNObjectConfig sharedInstance] refreshTokenWithBlockSuccess:^(BOOL refreshSuccess) {
|
||||||
|
|
||||||
|
return [self POSTWithEndpointAction:endPoint formData:postFormData parameters:parameters retries:retries-1 progress:uploadProgress success:success failure:failure];
|
||||||
|
} failure:^(NSError * _Nonnull error) {
|
||||||
|
|
||||||
|
if (failure) {
|
||||||
|
failure(nil,error);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (failure) {
|
||||||
|
failure(nil,error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[[PNObjectConfig sharedInstance] refreshTokenWithBlockSuccess:^(BOOL refreshSuccess) {
|
||||||
|
|
||||||
|
return [self POSTWithEndpointAction:endPoint formData:postFormData parameters:parameters retries:retries-1 progress:uploadProgress success:success failure:failure];
|
||||||
|
} failure:^(NSError * _Nonnull error) {
|
||||||
|
|
||||||
|
if (failure) {
|
||||||
|
failure(nil,error);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void) DELETEWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
||||||
|
return [self DELETEWithEndpointAction:endPoint parameters:parameters retries:MAX_RETRIES progress:uploadProgress success:success failure:failure];
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void) DELETEWithEndpointAction:(NSString * _Nonnull) endPoint
|
||||||
|
parameters:(NSDictionary * _Nullable) parameters
|
||||||
|
retries:(NSInteger) retries
|
||||||
|
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
||||||
|
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
||||||
|
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
||||||
|
|
||||||
|
if ([[PNObjectConfig sharedInstance] currentOauthCredential] && ![[[PNObjectConfig sharedInstance] currentOauthCredential] isExpired]) {
|
||||||
|
[[[PNObjectConfig sharedInstance] manager] DELETE:[[[PNObjectConfig sharedInstance] endPointUrl] stringByAppendingFormat:@"%@",endPoint]
|
||||||
|
parameters:parameters
|
||||||
|
success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||||
|
if (success) {
|
||||||
|
success(task,responseObject);
|
||||||
|
}
|
||||||
|
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||||
|
if (retries > 0) {
|
||||||
|
[[PNObjectConfig sharedInstance] refreshTokenWithBlockSuccess:^(BOOL refreshSuccess) {
|
||||||
|
|
||||||
|
[self DELETEWithEndpointAction:endPoint parameters:parameters retries:retries-1 progress:uploadProgress success:success failure:failure];
|
||||||
|
} failure:^(NSError * _Nonnull error) {
|
||||||
|
|
||||||
|
if (failure) {
|
||||||
|
failure(nil,error);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (failure) {
|
||||||
|
failure(nil,error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[[PNObjectConfig sharedInstance] refreshTokenWithBlockSuccess:^(BOOL refreshSuccess) {
|
||||||
|
|
||||||
|
[self DELETEWithEndpointAction:endPoint parameters:parameters retries:retries-1 progress:uploadProgress success:success failure:failure];
|
||||||
|
} failure:^(NSError * _Nonnull error) {
|
||||||
|
|
||||||
|
if (failure) {
|
||||||
|
failure(nil,error);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#pragma mark Private Methods
|
#pragma mark Private Methods
|
||||||
|
|
||||||
+ (id _Nonnull) parseObjectFromResponse:(id _Nullable) response {
|
+ (id _Nonnull) parseObjectFromResponse:(id _Nullable) response {
|
||||||
|
|||||||
@ -1,42 +0,0 @@
|
|||||||
//
|
|
||||||
// PNObjectConnection.h
|
|
||||||
// Pods
|
|
||||||
//
|
|
||||||
// Created by Giuseppe Nucifora on 18/01/16.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "PNObject.h"
|
|
||||||
#import "PNObjectFormData.h"
|
|
||||||
|
|
||||||
@interface PNObject (PNObjectDELETEConnection)
|
|
||||||
|
|
||||||
+ (void) DELETEWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
+ (void) DELETEWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
+ (void) DELETEWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
+ (void) DELETEWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
@end
|
|
||||||
@ -1,101 +0,0 @@
|
|||||||
//
|
|
||||||
// PNObjectConnection.m
|
|
||||||
// Pods
|
|
||||||
//
|
|
||||||
// Created by Giuseppe Nucifora on 18/01/16.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "PNObject+PNObjectDELETEConnection.h"
|
|
||||||
#import "PNObjectConstants.h"
|
|
||||||
#import <NSDate_Utils/NSDate+NSDate_Util.h>
|
|
||||||
#import "PNObjectConfig.h"
|
|
||||||
#import "PNObjectModel.h"
|
|
||||||
#import <AFNetworking/AFNetworking.h>
|
|
||||||
#import "PNObject+Protected.h"
|
|
||||||
#import "PNObject+PNObjectConnection.h"
|
|
||||||
|
|
||||||
@implementation PNObject (PNObjectDELETEConnection)
|
|
||||||
|
|
||||||
+ (void) DELETEWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
return [self DELETEWithEndpointAction:endPoint oauthMode:OAuthModeNo parameters:parameters retries:MAX_RETRIES progress:uploadProgress success:success failure:failure];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void) DELETEWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
return [self DELETEWithEndpointAction:endPoint oauthMode:OAuthModeNo parameters:parameters retries:retries progress:uploadProgress success:success failure:failure];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void) DELETEWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
return [self DELETEWithEndpointAction:endPoint oauthMode:oauthMode parameters:parameters retries:MAX_RETRIES progress:uploadProgress success:success failure:failure];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void) DELETEWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
|
|
||||||
if([[PNObjectConfig sharedInstance] setCredentialTokenForOauthMode:oauthMode]){
|
|
||||||
|
|
||||||
[[[PNObjectConfig sharedInstance] manager] DELETE:[[[PNObjectConfig sharedInstance] endPointUrl] stringByAppendingFormat:@"%@",endPoint]
|
|
||||||
parameters:parameters
|
|
||||||
success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
|
||||||
if (success) {
|
|
||||||
success(task,responseObject);
|
|
||||||
}
|
|
||||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
|
||||||
if (retries > 0) {
|
|
||||||
|
|
||||||
return [self DELETEWithEndpointAction:endPoint
|
|
||||||
oauthMode:oauthMode
|
|
||||||
parameters:parameters
|
|
||||||
retries:retries-1
|
|
||||||
progress:uploadProgress
|
|
||||||
success:success
|
|
||||||
failure:failure];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (failure) {
|
|
||||||
failure(nil,error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[[PNObjectConfig sharedInstance] refreshTokenForOauthMode:oauthMode retries:MAX_RETRIES WithBlockSuccess:^(BOOL refreshSuccess) {
|
|
||||||
|
|
||||||
[self DELETEWithEndpointAction:endPoint
|
|
||||||
oauthMode:oauthMode
|
|
||||||
parameters:parameters
|
|
||||||
retries:retries-1
|
|
||||||
progress:uploadProgress
|
|
||||||
success:success
|
|
||||||
failure:failure];
|
|
||||||
|
|
||||||
} failure:^(NSError * _Nonnull error) {
|
|
||||||
|
|
||||||
if (failure) {
|
|
||||||
failure(nil,error);
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
//
|
|
||||||
// PNObjectConnection.h
|
|
||||||
// Pods
|
|
||||||
//
|
|
||||||
// Created by Giuseppe Nucifora on 18/01/16.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "PNObject.h"
|
|
||||||
#import "PNObjectFormData.h"
|
|
||||||
|
|
||||||
@interface PNObject (PNObjectGETConnection)
|
|
||||||
|
|
||||||
#pragma mark - GET
|
|
||||||
|
|
||||||
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
|
|
||||||
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
@end
|
|
||||||
@ -1,116 +0,0 @@
|
|||||||
//
|
|
||||||
// PNObjectConnection.m
|
|
||||||
// Pods
|
|
||||||
//
|
|
||||||
// Created by Giuseppe Nucifora on 18/01/16.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "PNObject+PNObjectGETConnection.h"
|
|
||||||
#import "PNObject+PNObjectConnection.h"
|
|
||||||
#import "PNObjectConstants.h"
|
|
||||||
#import <NSDate_Utils/NSDate+NSDate_Util.h>
|
|
||||||
#import "PNObjectConfig.h"
|
|
||||||
#import "PNObjectModel.h"
|
|
||||||
#import <AFNetworking/AFNetworking.h>
|
|
||||||
#import "PNObject+Protected.h"
|
|
||||||
|
|
||||||
@implementation PNObject (PNObjectGETConnection)
|
|
||||||
|
|
||||||
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull downloadProgress)) downloadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
|
|
||||||
return [self GETWithEndpointAction:endPoint parameters:nil progress:downloadProgress success:success failure:failure];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
|
|
||||||
return [self GETWithEndpointAction:endPoint oauthMode:OAuthModeClientCredential parameters:parameters retries:MAX_RETRIES progress:downloadProgress success:success failure:failure];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
|
|
||||||
return [self GETWithEndpointAction:endPoint oauthMode:OAuthModeClientCredential parameters:parameters retries:retries progress:downloadProgress success:success failure:failure];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
return [self GETWithEndpointAction:endPoint oauthMode:oauthMode parameters:nil retries:MAX_RETRIES progress:downloadProgress success:success failure:failure];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
return [self GETWithEndpointAction:endPoint oauthMode:oauthMode parameters:parameters retries:MAX_RETRIES progress:downloadProgress success:success failure:failure];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void) GETWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable downloadProgress)) downloadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
|
|
||||||
if([[PNObjectConfig sharedInstance] setCredentialTokenForOauthMode:oauthMode]){
|
|
||||||
[[[PNObjectConfig sharedInstance] manager] GET:[[[PNObjectConfig sharedInstance] endPointUrl] stringByAppendingFormat:@"%@",endPoint] parameters:parameters progress:downloadProgress success:^(NSURLSessionDataTask *task, id responseObject) {
|
|
||||||
|
|
||||||
if (success) {
|
|
||||||
success(task,responseObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
|
||||||
if (retries > 0) {
|
|
||||||
|
|
||||||
return [self GETWithEndpointAction:endPoint
|
|
||||||
oauthMode:oauthMode
|
|
||||||
parameters:parameters
|
|
||||||
retries:retries-1
|
|
||||||
progress:downloadProgress
|
|
||||||
success:success
|
|
||||||
failure:failure];
|
|
||||||
|
|
||||||
}else {
|
|
||||||
if (failure) {
|
|
||||||
failure(task,error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[[PNObjectConfig sharedInstance] refreshTokenForOauthMode:oauthMode retries:MAX_RETRIES WithBlockSuccess:^(BOOL refreshSuccess) {
|
|
||||||
|
|
||||||
return [self GETWithEndpointAction:endPoint
|
|
||||||
oauthMode:oauthMode
|
|
||||||
parameters:parameters
|
|
||||||
retries:retries-1
|
|
||||||
progress:downloadProgress
|
|
||||||
success:success
|
|
||||||
failure:failure];
|
|
||||||
} failure:^(NSError * _Nonnull error) {
|
|
||||||
if (failure) {
|
|
||||||
failure(nil,error);
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
@ -1,79 +0,0 @@
|
|||||||
//
|
|
||||||
// PNObjectConnection.h
|
|
||||||
// Pods
|
|
||||||
//
|
|
||||||
// Created by Giuseppe Nucifora on 18/01/16.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "PNObject.h"
|
|
||||||
#import "PNObjectFormData.h"
|
|
||||||
|
|
||||||
@interface PNObject (PNObjectPOSTConnection)
|
|
||||||
|
|
||||||
#pragma mark - POST
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
|
|
||||||
#pragma mark - FORM DATA
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
formData:(NSArray * _Nullable) postFormData
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
formData:(NSArray * _Nullable) postFormData
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
formData:(NSArray * _Nullable) postFormData
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
formData:(NSArray * _Nullable) postFormData
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
@end
|
|
||||||
@ -1,236 +0,0 @@
|
|||||||
//
|
|
||||||
// PNObjectConnection.m
|
|
||||||
// Pods
|
|
||||||
//
|
|
||||||
// Created by Giuseppe Nucifora on 18/01/16.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "PNObject+PNObjectConnection.h"
|
|
||||||
#import "PNObjectConstants.h"
|
|
||||||
#import <NSDate_Utils/NSDate+NSDate_Util.h>
|
|
||||||
#import "PNObjectConfig.h"
|
|
||||||
#import "PNObjectModel.h"
|
|
||||||
#import <AFNetworking/AFNetworking.h>
|
|
||||||
#import "PNObject+Protected.h"
|
|
||||||
#import "PNObject+PNObjectConnection.h"
|
|
||||||
|
|
||||||
@implementation PNObject (PNObjectPOSTConnection)
|
|
||||||
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
return [self POSTWithEndpointAction:endPoint
|
|
||||||
oauthMode:OAuthModeClientCredential
|
|
||||||
parameters:parameters retries:MAX_RETRIES
|
|
||||||
progress:uploadProgress success:success
|
|
||||||
failure:failure];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
return [self POSTWithEndpointAction:endPoint
|
|
||||||
oauthMode:OAuthModeClientCredential
|
|
||||||
parameters:parameters retries:retries
|
|
||||||
progress:uploadProgress success:success
|
|
||||||
failure:failure];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nullable uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
return [self POSTWithEndpointAction:endPoint
|
|
||||||
oauthMode:oauthMode
|
|
||||||
parameters:parameters
|
|
||||||
retries:MAX_RETRIES
|
|
||||||
progress:uploadProgress
|
|
||||||
success:success
|
|
||||||
failure:failure];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
|
|
||||||
if([[PNObjectConfig sharedInstance] setCredentialTokenForOauthMode:oauthMode]){
|
|
||||||
|
|
||||||
[[[PNObjectConfig sharedInstance] manager] POST:[[[PNObjectConfig sharedInstance] endPointUrl] stringByAppendingFormat:@"%@",endPoint]
|
|
||||||
parameters:parameters
|
|
||||||
progress:uploadProgress
|
|
||||||
success:^(NSURLSessionDataTask *task, id responseObject) {
|
|
||||||
|
|
||||||
if (success) {
|
|
||||||
success(task,responseObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
|
||||||
if (retries > 0) {
|
|
||||||
|
|
||||||
return [self POSTWithEndpointAction:endPoint
|
|
||||||
parameters:parameters
|
|
||||||
retries:retries-1
|
|
||||||
progress:uploadProgress
|
|
||||||
success:success
|
|
||||||
failure:failure];
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (failure) {
|
|
||||||
failure(task, error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[[PNObjectConfig sharedInstance] refreshTokenForOauthMode:oauthMode
|
|
||||||
retries:MAX_RETRIES
|
|
||||||
WithBlockSuccess:^(BOOL refreshSuccess) {
|
|
||||||
|
|
||||||
return [self POSTWithEndpointAction:endPoint
|
|
||||||
oauthMode:oauthMode
|
|
||||||
parameters:parameters
|
|
||||||
retries:retries-1
|
|
||||||
progress:uploadProgress
|
|
||||||
success:success
|
|
||||||
failure:failure];
|
|
||||||
} failure:^(NSError * _Nonnull error) {
|
|
||||||
|
|
||||||
if (failure) {
|
|
||||||
failure(nil,error);
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
formData:(NSArray * _Nullable) postFormData
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
|
|
||||||
return [self POSTWithEndpointAction:endPoint
|
|
||||||
oauthMode:OAuthModeClientCredential
|
|
||||||
formData:postFormData
|
|
||||||
parameters:parameters
|
|
||||||
retries:MAX_RETRIES
|
|
||||||
progress:uploadProgress
|
|
||||||
success:success
|
|
||||||
failure:failure];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
formData:(NSArray * _Nullable) postFormData
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
return [self POSTWithEndpointAction:endPoint
|
|
||||||
oauthMode:OAuthModeClientCredential
|
|
||||||
formData:postFormData
|
|
||||||
parameters:parameters
|
|
||||||
retries:retries
|
|
||||||
progress:uploadProgress
|
|
||||||
success:success
|
|
||||||
failure:failure];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
formData:(NSArray * _Nullable) postFormData
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
return [self POSTWithEndpointAction:endPoint oauthMode:oauthMode formData:postFormData parameters:parameters retries:MAX_RETRIES progress:uploadProgress success:success failure:failure];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (void) POSTWithEndpointAction:(NSString * _Nonnull) endPoint
|
|
||||||
oauthMode:(OAuthMode) oauthMode
|
|
||||||
formData:(NSArray * _Nullable) postFormData
|
|
||||||
parameters:(NSDictionary * _Nullable) parameters
|
|
||||||
retries:(NSInteger) retries
|
|
||||||
progress:(nullable void (^)(NSProgress * _Nonnull uploadProgress)) uploadProgress
|
|
||||||
success:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSDictionary * _Nullable responseObject))success
|
|
||||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failure {
|
|
||||||
|
|
||||||
|
|
||||||
if([[PNObjectConfig sharedInstance] setCredentialTokenForOauthMode:oauthMode]){
|
|
||||||
|
|
||||||
[[[PNObjectConfig sharedInstance] manager] POST:[[[PNObjectConfig sharedInstance] endPointUrl] stringByAppendingFormat:@"%@",endPoint]
|
|
||||||
parameters:parameters
|
|
||||||
constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) {
|
|
||||||
if (postFormData) {
|
|
||||||
for (PNObjectFormData *postData in postFormData) {
|
|
||||||
|
|
||||||
[formData appendPartWithFileData:[postData formData]
|
|
||||||
name:[postData name]
|
|
||||||
fileName:[postData fileName]
|
|
||||||
mimeType:[postData mimeType]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
progress:uploadProgress
|
|
||||||
success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
|
||||||
if (success) {
|
|
||||||
success(task,responseObject);
|
|
||||||
}
|
|
||||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
|
||||||
if (retries > 0) {
|
|
||||||
|
|
||||||
return [self POSTWithEndpointAction:endPoint
|
|
||||||
formData:postFormData
|
|
||||||
parameters:parameters
|
|
||||||
retries:retries-1
|
|
||||||
progress:uploadProgress
|
|
||||||
success:success
|
|
||||||
failure:failure];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (failure) {
|
|
||||||
failure(nil,error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[[PNObjectConfig sharedInstance] refreshTokenForOauthMode:oauthMode
|
|
||||||
retries:MAX_RETRIES
|
|
||||||
WithBlockSuccess:^(BOOL refreshSuccess) {
|
|
||||||
|
|
||||||
return [self POSTWithEndpointAction:endPoint
|
|
||||||
oauthMode:oauthMode
|
|
||||||
formData:postFormData
|
|
||||||
parameters:parameters
|
|
||||||
retries:retries-1
|
|
||||||
progress:uploadProgress
|
|
||||||
success:success
|
|
||||||
failure:failure];
|
|
||||||
} failure:^(NSError * _Nonnull error) {
|
|
||||||
|
|
||||||
if (failure) {
|
|
||||||
failure(nil,error);
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
@ -47,12 +47,6 @@ extern NSString* _Nonnull const EnvironmentDevelopment;
|
|||||||
extern NSString* _Nonnull const Client_ID;
|
extern NSString* _Nonnull const Client_ID;
|
||||||
extern NSString* _Nonnull const Client_Secret;
|
extern NSString* _Nonnull const Client_Secret;
|
||||||
|
|
||||||
extern NSString* _Nonnull const Client_Credential_ID;
|
|
||||||
extern NSString* _Nonnull const Client_Credential_Secret;
|
|
||||||
|
|
||||||
extern NSString* _Nonnull const Client_Username;
|
|
||||||
extern NSString* _Nonnull const Client_Password;
|
|
||||||
|
|
||||||
typedef NS_ENUM(NSInteger, OAuthMode) {
|
typedef NS_ENUM(NSInteger, OAuthMode) {
|
||||||
OAuthModeNo = 0,
|
OAuthModeNo = 0,
|
||||||
OAuthModeClientCredential,
|
OAuthModeClientCredential,
|
||||||
@ -73,8 +67,8 @@ typedef NS_ENUM(NSInteger, OAuthMode) {
|
|||||||
* @param endpointUrlsForEnvironments
|
* @param endpointUrlsForEnvironments
|
||||||
* For example,
|
* For example,
|
||||||
* @{ PNObjectConfigDevelopment : @"https://development.it/api/v1",
|
* @{ PNObjectConfigDevelopment : @"https://development.it/api/v1",
|
||||||
* PNObjectConfigEnvStage : @"https://stage.it/api/v1",
|
* PNObjectConfigEnvStage : @"ttps://stage.it/api/v1",
|
||||||
* PNObjectConfigEnvProduction : @"https://production.it/api/v1"
|
* PNObjectConfigEnvProduction : @"ttps://production.it/api/v1"
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* @return singleton
|
* @return singleton
|
||||||
@ -87,8 +81,8 @@ typedef NS_ENUM(NSInteger, OAuthMode) {
|
|||||||
* @param endpointUrlsForEnvironments
|
* @param endpointUrlsForEnvironments
|
||||||
* For example,
|
* For example,
|
||||||
* @{ PNObjectConfigDevelopment : @"https://development.it/api/v1",
|
* @{ PNObjectConfigDevelopment : @"https://development.it/api/v1",
|
||||||
* PNObjectConfigEnvStage : @"https://stage.it/api/v1",
|
* PNObjectConfigEnvStage : @"ttps://stage.it/api/v1",
|
||||||
* PNObjectConfigEnvProduction : @"https://production.it/api/v1"
|
* PNObjectConfigEnvProduction : @"ttps://production.it/api/v1"
|
||||||
* }
|
* }
|
||||||
* @param userSubClass <#userSubClass description#>
|
* @param userSubClass <#userSubClass description#>
|
||||||
*
|
*
|
||||||
@ -96,6 +90,36 @@ typedef NS_ENUM(NSInteger, OAuthMode) {
|
|||||||
*/
|
*/
|
||||||
+ (instancetype _Nonnull) initSharedInstanceForEnvironments:(NSDictionary * _Nonnull) endpointUrlsForEnvironments andUserSubclass:(Class _Nonnull) userSubClass;
|
+ (instancetype _Nonnull) initSharedInstanceForEnvironments:(NSDictionary * _Nonnull) endpointUrlsForEnvironments andUserSubclass:(Class _Nonnull) userSubClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param endpointUrlsForEnvironments
|
||||||
|
* For example,
|
||||||
|
* @{ PNObjectConfigDevelopment : @"https://development.it/api/v1",
|
||||||
|
* PNObjectConfigEnvStage : @"ttps://stage.it/api/v1",
|
||||||
|
* PNObjectConfigEnvProduction : @"ttps://production.it/api/v1"
|
||||||
|
* }
|
||||||
|
* @param oauthMode <#oauthEnabled description#>
|
||||||
|
*
|
||||||
|
* @return singleton
|
||||||
|
*/
|
||||||
|
+ (instancetype _Nonnull) initSharedInstanceForEnvironments:(NSDictionary * _Nonnull) endpointUrlsForEnvironments withOauthMode:(OAuthMode) oauthMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <#Description#>
|
||||||
|
*
|
||||||
|
* @param endpointUrlsForEnvironments
|
||||||
|
* For example,
|
||||||
|
* @{ PNObjectConfigDevelopment : @"https://development.it/api/v1",
|
||||||
|
* PNObjectConfigEnvStage : @"ttps://stage.it/api/v1",
|
||||||
|
* PNObjectConfigEnvProduction : @"ttps://production.it/api/v1"
|
||||||
|
* }
|
||||||
|
* @param userSubClass <#userSubClass description#>
|
||||||
|
* @param oauthMode <#oauthEnabled description#>
|
||||||
|
*
|
||||||
|
* @return <#return value description#>
|
||||||
|
*/
|
||||||
|
+ (instancetype _Nonnull) initSharedInstanceForEnvironments:(NSDictionary * _Nonnull) endpointUrlsForEnvironments userSubclass:(Class _Nonnull) userSubClass withOauthMode:(OAuthMode) oauthMode;
|
||||||
/**
|
/**
|
||||||
* <#Description#>
|
* <#Description#>
|
||||||
*
|
*
|
||||||
@ -122,17 +146,9 @@ typedef NS_ENUM(NSInteger, OAuthMode) {
|
|||||||
- (void) removeHTTPHeaderValueForKey:(NSString * _Nonnull) key;
|
- (void) removeHTTPHeaderValueForKey:(NSString * _Nonnull) key;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
- (void) setClientID:(NSString * _Nonnull) clientID clientSecret:(NSString* _Nonnull) clientSecret forEnv:(NSString * _Nonnull) environment;
|
||||||
*
|
|
||||||
* @param clientID Client ID for selected environment
|
|
||||||
* @param clientSecret Client Secret for selected environment
|
|
||||||
* @param oAuthEndpointAction endpoint action. You can pass specia string "%@" to autoset EndpointPath to Oauth endpointPath
|
|
||||||
* @param oauthMode OauthMode
|
|
||||||
* @param environment environment
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
- (void) setClientID:(NSString * _Nonnull) clientID clientSecret:(NSString* _Nonnull) clientSecret oAuthEndpointAction:(NSString* _Nonnull) oAuthEndpointAction oauthMode:(OAuthMode) oauthMode refreshTokenEnabled:(BOOL) refreshTokenEnabled forEnv:(NSString * _Nonnull) environment;
|
|
||||||
|
|
||||||
- (void) setOauthUserName:(NSString * _Nonnull)oauthUserName oauthPassword:(NSString* _Nonnull) oauthPassword forEnv:(NSString * _Nonnull) environment;
|
- (void) setOauthUserName:(NSString * _Nonnull)oauthUserName oauthPassword:(NSString* _Nonnull) oauthPassword forEnv:(NSString * _Nonnull) environment;
|
||||||
|
|
||||||
@ -211,44 +227,14 @@ typedef NS_ENUM(NSInteger, OAuthMode) {
|
|||||||
failure:(nullable void (^)(NSError * _Nonnull error))failure;
|
failure:(nullable void (^)(NSError * _Nonnull error))failure;
|
||||||
|
|
||||||
|
|
||||||
- (void) refreshTokenForUserWithUsername:(NSString * _Nonnull) username
|
|
||||||
password:(NSString * _Nonnull) password
|
|
||||||
withBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success
|
|
||||||
failure:(nullable void (^)(NSError * _Nonnull error))failure;
|
|
||||||
/**
|
|
||||||
* <#Description#>
|
|
||||||
*/
|
|
||||||
- (void) refreshTokenForUserWithFacebookId:(NSString * _Nonnull) facebookId
|
- (void) refreshTokenForUserWithFacebookId:(NSString * _Nonnull) facebookId
|
||||||
facebookToken:(NSString * _Nonnull) facebookToken
|
facebookToken:(NSString * _Nonnull) facebookToken
|
||||||
withBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success
|
withBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success
|
||||||
failure:(nullable void (^)(NSError * _Nonnull error))failure;
|
failure:(nullable void (^)(NSError * _Nonnull error))failure;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <#Description#>
|
* <#Description#>
|
||||||
*/
|
*/
|
||||||
- (void) refreshTokenForOauthMode:(OAuthMode) oauthMode
|
- (BOOL) resetToken;
|
||||||
retries:(NSUInteger) retries
|
|
||||||
WithBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success
|
|
||||||
failure:(nullable void (^)(NSError * _Nonnull error))failure;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <#Description#>
|
|
||||||
*/
|
|
||||||
- (BOOL) resetTokenForOauthMode:(OAuthMode) oauthMode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <#Description#>
|
|
||||||
*/
|
|
||||||
- (void) resetAllTokens;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <#Description#>
|
|
||||||
*/
|
|
||||||
- (BOOL) setCredentialTokenForOauthMode:(OAuthMode) oauthMode;
|
|
||||||
|
|
||||||
- (AFOAuthCredential * _Nullable) currentOauthClientCredential;
|
|
||||||
|
|
||||||
- (AFOAuthCredential * _Nullable) currentOauthUserCredential;
|
|
||||||
|
|
||||||
///--------------------------------------
|
///--------------------------------------
|
||||||
#pragma mark - PNObjectConfig Properties
|
#pragma mark - PNObjectConfig Properties
|
||||||
@ -263,22 +249,17 @@ typedef NS_ENUM(NSInteger, OAuthMode) {
|
|||||||
/**
|
/**
|
||||||
* <#Description#>
|
* <#Description#>
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, strong, readonly, nonnull) AFJSONRequestSerializer *managerJsonRequestSerializer;
|
@property (nonatomic, strong, readonly, nonnull) AFJSONRequestSerializer *jsonSerializer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <#Description#>
|
* <#Description#>
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, strong, readonly, nonnull) AFHTTPRequestSerializer *managerHttpRequestSerializer;
|
@property (nonatomic, strong, readonly, nonnull) AFHTTPRequestSerializer *httpSerializer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <#Description#>
|
* <#Description#>
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, strong, readonly, nonnull) AFJSONRequestSerializer *oauthJsonRequestSerializer;
|
@property (nonatomic, strong, nullable, readonly) AFOAuthCredential *currentOauthCredential;
|
||||||
|
|
||||||
/**
|
|
||||||
* <#Description#>
|
|
||||||
*/
|
|
||||||
@property (nonatomic, strong, readonly, nonnull) AFHTTPRequestSerializer *oauthHttpRequestSerializer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <#Description#>
|
* <#Description#>
|
||||||
|
|||||||
@ -16,7 +16,6 @@
|
|||||||
#import <NSDataAES/NSData+AES.h>
|
#import <NSDataAES/NSData+AES.h>
|
||||||
#import <DDDKeychainWrapper/DDDKeychainWrapper.h>
|
#import <DDDKeychainWrapper/DDDKeychainWrapper.h>
|
||||||
#import "HTTPStatusCodes.h"
|
#import "HTTPStatusCodes.h"
|
||||||
#import "PNObject+PNObjectConnection.h"
|
|
||||||
|
|
||||||
NSString * const PNObjectLocalNotificationRefreshTokenClientCredentialSuccess = @"PNObjectLocalNotificationRefreshTokenClientCredentialSuccess";
|
NSString * const PNObjectLocalNotificationRefreshTokenClientCredentialSuccess = @"PNObjectLocalNotificationRefreshTokenClientCredentialSuccess";
|
||||||
NSString * const PNObjectLocalNotificationRefreshTokenClientCredentialFail = @"PNObjectLocalNotificationRefreshTokenClientCredentialFail";
|
NSString * const PNObjectLocalNotificationRefreshTokenClientCredentialFail = @"PNObjectLocalNotificationRefreshTokenClientCredentialFail";
|
||||||
@ -48,48 +47,29 @@ NSString* const EnvironmentDevelopment = @"PNObjectConfigDevelopment";
|
|||||||
|
|
||||||
NSString* const BaseUrl = @"base_url";
|
NSString* const BaseUrl = @"base_url";
|
||||||
NSString* const EndpointPath = @"endpoint_path";
|
NSString* const EndpointPath = @"endpoint_path";
|
||||||
|
NSString* const Client_ID = @"client_id";
|
||||||
NSString* const Client_ID = @"oauth_user_credential_client_id";
|
NSString* const Client_Secret = @"client_secret";
|
||||||
NSString* const Client_Secret = @"oauth_user_credential_client_secret";
|
|
||||||
NSString* const Client_EndpointAction = @"oauth_user_credential_endpoint_action";
|
|
||||||
NSString* const Client_Refresh_Token_Enabled = @"oauth_user_credential_refresh_token_enabled";
|
|
||||||
|
|
||||||
NSString* const Client_Credential_ID = @"oauth_client_credential_client_id";
|
|
||||||
NSString* const Client_Credential_Secret = @"oauth_client_credential_client_secret";
|
|
||||||
NSString* const Client_Credential_EndpointAction = @"oauth_client_credential_endpoint_action";
|
|
||||||
NSString* const Client_Credential_Refresh_Token_Enabled = @"oauth_client_credential_refresh_token_enabled";
|
|
||||||
|
|
||||||
NSString* const Client_Username = @"client_username";
|
NSString* const Client_Username = @"client_username";
|
||||||
NSString* const Client_Password = @"client_password";
|
NSString* const Client_Password = @"client_password";
|
||||||
|
|
||||||
@interface PNObjectConfig()
|
@interface PNObjectConfig()
|
||||||
|
|
||||||
|
@property (nonatomic) OAuthMode oauthMode;
|
||||||
|
|
||||||
@property (nonatomic, strong) NSMutableDictionary *configuration;
|
@property (nonatomic, strong) NSMutableDictionary *configuration;
|
||||||
@property (nonatomic, strong) NSMutableDictionary *headerFields;
|
@property (nonatomic, strong) NSMutableDictionary *headerFields;
|
||||||
@property (nonatomic, strong) NSString *currentEnv;
|
@property (nonatomic, strong) NSString *currentEnv;
|
||||||
@property (nonatomic, strong) NSString *currentBaseUrl;
|
@property (nonatomic, strong) NSString *currentBaseUrl;
|
||||||
@property (nonatomic, strong) NSString *currentEndPointPath;
|
@property (nonatomic, strong) NSString *currentEndPointPath;
|
||||||
@property (nonatomic, strong) NSString *currentEndPointUrl;
|
@property (nonatomic, strong) NSString *currentEndPointUrl;
|
||||||
|
@property (nonatomic, strong) NSString *currentOAuthClientID;
|
||||||
/* Client credential configurations */
|
@property (nonatomic, strong) NSString *currentOAuthClientSecret;
|
||||||
@property (nonatomic, strong) NSString *currentClientCredenzialEndPointPath;
|
|
||||||
@property (nonatomic, strong) NSString *currentClientCredenzialEndPointUrl;
|
|
||||||
@property (nonatomic, strong) NSString *currentClientCredenzialClientID;
|
|
||||||
@property (nonatomic, strong) NSString *currentClientCredenzialClientSecret;
|
|
||||||
@property (nonatomic) BOOL currentClientCredenzialRefreshTokenEnabled;
|
|
||||||
|
|
||||||
/* User credential configuration */
|
|
||||||
@property (nonatomic, strong) NSString *currentUserCredenzialEndPointPath;
|
|
||||||
@property (nonatomic, strong) NSString *currentUserCredenzialEndPointUrl;
|
|
||||||
@property (nonatomic, strong) NSString *currentUserCredenzialClientID;
|
|
||||||
@property (nonatomic, strong) NSString *currentUserCredenzialClientSecret;
|
|
||||||
@property (nonatomic) BOOL currentUserCredenzialRefreshTokenEnabled;
|
|
||||||
|
|
||||||
@property (nonatomic, strong) NSString *currentOAuthUserName;
|
@property (nonatomic, strong) NSString *currentOAuthUserName;
|
||||||
@property (nonatomic, strong) NSString *currentOAuthPassword;
|
@property (nonatomic, strong) NSString *currentOAuthPassword;
|
||||||
|
|
||||||
@property (nonatomic, strong) AFOAuth2Manager *clientCredentialAuthManager;
|
@property (nonatomic, strong) AFOAuth2Manager *authManager;
|
||||||
@property (nonatomic, strong) AFOAuth2Manager *userCredentialAuthManager;
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@ -112,19 +92,24 @@ static bool isFirstAccess = YES;
|
|||||||
#pragma mark - Life Cycle
|
#pragma mark - Life Cycle
|
||||||
|
|
||||||
+ (instancetype _Nonnull) initSharedInstanceForEnvironments:(NSDictionary *) endpointUrlsForEnvironments {
|
+ (instancetype _Nonnull) initSharedInstanceForEnvironments:(NSDictionary *) endpointUrlsForEnvironments {
|
||||||
return [self initSharedInstanceForEnvironments:endpointUrlsForEnvironments userSubclass:[PNUser class] withoauthMode:OAuthModeClientCredential];
|
return [self initSharedInstanceForEnvironments:endpointUrlsForEnvironments userSubclass:[PNUser class] withOauthMode:OAuthModeClientCredential];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (instancetype _Nonnull) initSharedInstanceForEnvironments:(NSDictionary *)endpointUrlsForEnvironments andUserSubclass:(Class)userSubClass {
|
+ (instancetype _Nonnull) initSharedInstanceForEnvironments:(NSDictionary *)endpointUrlsForEnvironments andUserSubclass:(Class)userSubClass {
|
||||||
return [self initSharedInstanceForEnvironments:endpointUrlsForEnvironments userSubclass:userSubClass withoauthMode:OAuthModeClientCredential];
|
return [self initSharedInstanceForEnvironments:endpointUrlsForEnvironments userSubclass:userSubClass withOauthMode:OAuthModeClientCredential];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (instancetype _Nonnull) initSharedInstanceForEnvironments:(NSDictionary * _Nonnull) endpointUrlsForEnvironments userSubclass:(Class _Nonnull) userSubClass withoauthMode:(OAuthMode) oauthMode {
|
|
||||||
|
+ (instancetype _Nonnull) initSharedInstanceForEnvironments:(NSDictionary *) endpointUrlsForEnvironments withOauthMode:(OAuthMode) oauthMode {
|
||||||
|
return [self initSharedInstanceForEnvironments:endpointUrlsForEnvironments userSubclass:[PNUser class] withOauthMode:oauthMode];
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (instancetype _Nonnull) initSharedInstanceForEnvironments:(NSDictionary * _Nonnull) endpointUrlsForEnvironments userSubclass:(Class _Nonnull) userSubClass withOauthMode:(OAuthMode) oauthMode {
|
||||||
|
|
||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
dispatch_once(&onceToken, ^{
|
dispatch_once(&onceToken, ^{
|
||||||
isFirstAccess = NO;
|
isFirstAccess = NO;
|
||||||
SINGLETON_PNObjectConfig = [[super allocWithZone:NULL] initWithUserSubclass:userSubClass];
|
SINGLETON_PNObjectConfig = [[super allocWithZone:NULL] initWithUserSubclass:userSubClass withOauthMode:oauthMode];
|
||||||
|
|
||||||
if (SINGLETON_PNObjectConfig) {
|
if (SINGLETON_PNObjectConfig) {
|
||||||
|
|
||||||
@ -146,6 +131,7 @@ static bool isFirstAccess = YES;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
NSAssert([SINGLETON_PNObjectConfig.configuration objectForKey:EnvironmentProduction], @"EnvironmentProduction must be valid endpoint url");
|
NSAssert([SINGLETON_PNObjectConfig.configuration objectForKey:EnvironmentProduction], @"EnvironmentProduction must be valid endpoint url");
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -177,7 +163,7 @@ static bool isFirstAccess = YES;
|
|||||||
return [[PNObjectConfig alloc] init];
|
return [[PNObjectConfig alloc] init];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithUserSubclass:(Class _Nonnull) userSubClass
|
- (id) initWithUserSubclass:(Class _Nonnull) userSubClass withOauthMode:(OAuthMode) oauthMode
|
||||||
{
|
{
|
||||||
if(SINGLETON_PNObjectConfig){
|
if(SINGLETON_PNObjectConfig){
|
||||||
return SINGLETON_PNObjectConfig;
|
return SINGLETON_PNObjectConfig;
|
||||||
@ -188,15 +174,13 @@ static bool isFirstAccess = YES;
|
|||||||
self = [super init];
|
self = [super init];
|
||||||
|
|
||||||
if (self) {
|
if (self) {
|
||||||
|
_oauthMode = oauthMode;
|
||||||
_userSubClass = userSubClass;
|
_userSubClass = userSubClass;
|
||||||
_configuration = [[NSMutableDictionary alloc] init];
|
_configuration = [[NSMutableDictionary alloc] init];
|
||||||
_minPasswordLenght = minPassLenght;
|
_minPasswordLenght = minPassLenght;
|
||||||
_currentEnv = EnvironmentProduction;
|
_currentEnv = EnvironmentProduction;
|
||||||
_managerJsonRequestSerializer = [AFJSONRequestSerializer serializer];
|
_jsonSerializer = [AFJSONRequestSerializer serializer];
|
||||||
_managerHttpRequestSerializer = [AFHTTPRequestSerializer serializer];
|
_httpSerializer = [AFHTTPRequestSerializer serializer];
|
||||||
|
|
||||||
_oauthJsonRequestSerializer = [AFJSONRequestSerializer serializer];
|
|
||||||
_oauthHttpRequestSerializer = [AFHTTPRequestSerializer serializer];
|
|
||||||
|
|
||||||
_headerFields = [[NSMutableDictionary alloc] init];
|
_headerFields = [[NSMutableDictionary alloc] init];
|
||||||
|
|
||||||
@ -208,18 +192,26 @@ static bool isFirstAccess = YES;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AFOAuthCredential *credential = [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceClientCredentialIdentifier];
|
|
||||||
|
|
||||||
if (!credential || [credential isExpired]) {
|
switch (_oauthMode) {
|
||||||
[AFOAuthCredential deleteCredentialWithIdentifier:PNObjectServiceClientCredentialIdentifier];
|
case OAuthModePassword:
|
||||||
|
case OAuthModeClientCredential:
|
||||||
|
default: {
|
||||||
|
|
||||||
|
AFOAuthCredential *clientCredential = [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceClientCredentialIdentifier];
|
||||||
|
|
||||||
|
if (clientCredential) {
|
||||||
|
_currentOauthCredential = clientCredential;
|
||||||
|
}
|
||||||
|
|
||||||
|
AFOAuthCredential *userCredential = [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceUserCredentialIdentifier];
|
||||||
|
|
||||||
|
if (userCredential) {
|
||||||
|
_currentOauthCredential = userCredential;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
credential = [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceUserCredentialIdentifier];
|
|
||||||
|
|
||||||
if (!credential || [credential isExpired]) {
|
|
||||||
[AFOAuthCredential deleteCredentialWithIdentifier:PNObjectServiceUserCredentialIdentifier];
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@ -228,87 +220,36 @@ static bool isFirstAccess = YES;
|
|||||||
|
|
||||||
_currentEnv = environment;
|
_currentEnv = environment;
|
||||||
_currentBaseUrl = nil;
|
_currentBaseUrl = nil;
|
||||||
|
|
||||||
_currentEndPointPath = nil;
|
_currentEndPointPath = nil;
|
||||||
_currentEndPointUrl = nil;
|
_currentEndPointUrl = nil;
|
||||||
|
_currentOAuthClientID = nil;
|
||||||
_currentClientCredenzialEndPointPath = nil;
|
_currentOAuthClientSecret = nil;
|
||||||
_currentClientCredenzialEndPointUrl = nil;
|
|
||||||
_currentClientCredenzialClientID = nil;
|
|
||||||
_currentClientCredenzialClientSecret = nil;
|
|
||||||
|
|
||||||
_currentUserCredenzialEndPointPath = nil;
|
|
||||||
_currentUserCredenzialEndPointUrl = nil;
|
|
||||||
_currentUserCredenzialClientID = nil;
|
|
||||||
_currentUserCredenzialClientSecret = nil;
|
|
||||||
|
|
||||||
_currentOAuthUserName = nil;
|
_currentOAuthUserName = nil;
|
||||||
_currentOAuthPassword = nil;
|
_currentOAuthPassword = nil;
|
||||||
|
|
||||||
if ([_configuration objectForKey:_currentEnv]) {
|
if ([_configuration objectForKey:environment]) {
|
||||||
|
_currentBaseUrl = [[_configuration objectForKey:_currentEnv] objectForKey:BaseUrl];
|
||||||
NSDictionary *currentEnvConfig = [_configuration objectForKey:_currentEnv];
|
_currentEndPointPath = ([[_configuration objectForKey:_currentEnv] objectForKey:EndpointPath] ? [[_configuration objectForKey:_currentEnv] objectForKey:EndpointPath] : @"");
|
||||||
|
|
||||||
_currentBaseUrl = [currentEnvConfig objectForKey:BaseUrl];
|
|
||||||
|
|
||||||
_currentEndPointPath = ([currentEnvConfig objectForKey:EndpointPath] ? [currentEnvConfig objectForKey:EndpointPath] : @"");
|
|
||||||
_currentEndPointUrl = [_currentBaseUrl stringByAppendingString:_currentEndPointPath];
|
_currentEndPointUrl = [_currentBaseUrl stringByAppendingString:_currentEndPointPath];
|
||||||
|
_currentOAuthClientID = [[_configuration objectForKey:_currentEnv] objectForKey:Client_ID];
|
||||||
_currentClientCredenzialClientID = [currentEnvConfig objectForKey:Client_Credential_ID];
|
_currentOAuthClientSecret = [[_configuration objectForKey:_currentEnv] objectForKey:Client_Secret];
|
||||||
_currentClientCredenzialClientSecret = [currentEnvConfig objectForKey:Client_Credential_Secret];
|
if ([[_configuration objectForKey:_currentEnv] objectForKey:Client_Username] && [[_configuration objectForKey:_currentEnv] objectForKey:Client_Password]) {
|
||||||
_currentClientCredenzialEndPointPath = ([currentEnvConfig objectForKey:Client_Credential_EndpointAction] ? [currentEnvConfig objectForKey:Client_Credential_EndpointAction] : @"");
|
_currentOAuthUserName = [[_configuration objectForKey:_currentEnv] objectForKey:Client_Username];
|
||||||
_currentClientCredenzialRefreshTokenEnabled = ([currentEnvConfig objectForKey:Client_Credential_Refresh_Token_Enabled] ? [[currentEnvConfig objectForKey:Client_Credential_Refresh_Token_Enabled] boolValue] : YES);
|
_currentOAuthPassword = [[_configuration objectForKey:_currentEnv] objectForKey:Client_Password];
|
||||||
|
|
||||||
if([_currentClientCredenzialEndPointPath containsString:@"%@"]){
|
|
||||||
_currentClientCredenzialEndPointPath = [NSString stringWithFormat:_currentClientCredenzialEndPointPath,_currentEndPointPath];
|
|
||||||
}
|
|
||||||
_currentClientCredenzialEndPointUrl = [_currentBaseUrl stringByAppendingString:_currentClientCredenzialEndPointPath];
|
|
||||||
|
|
||||||
|
|
||||||
if (![currentEnvConfig objectForKey:Client_ID] || ![currentEnvConfig objectForKey:Client_Secret]) {
|
|
||||||
_currentUserCredenzialClientID = _currentClientCredenzialClientID;
|
|
||||||
_currentUserCredenzialClientSecret = _currentClientCredenzialClientSecret;
|
|
||||||
_currentUserCredenzialEndPointPath = _currentClientCredenzialEndPointPath;
|
|
||||||
_currentUserCredenzialEndPointUrl = _currentClientCredenzialEndPointUrl;
|
|
||||||
_currentUserCredenzialRefreshTokenEnabled = _currentClientCredenzialRefreshTokenEnabled;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
_currentUserCredenzialClientID = [currentEnvConfig objectForKey:Client_ID];
|
|
||||||
_currentUserCredenzialClientSecret = [currentEnvConfig objectForKey:Client_Secret];
|
|
||||||
|
|
||||||
_currentUserCredenzialEndPointPath = [currentEnvConfig objectForKey:Client_EndpointAction];
|
|
||||||
|
|
||||||
if([_currentUserCredenzialEndPointPath containsString:@"%@"]){
|
|
||||||
_currentUserCredenzialEndPointPath = [NSString stringWithFormat:_currentUserCredenzialEndPointPath,_currentEndPointPath];
|
|
||||||
}
|
|
||||||
_currentUserCredenzialEndPointUrl = [_currentBaseUrl stringByAppendingString:_currentUserCredenzialEndPointPath];
|
|
||||||
|
|
||||||
_currentUserCredenzialRefreshTokenEnabled = [currentEnvConfig objectForKey:Client_Refresh_Token_Enabled];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ([currentEnvConfig objectForKey:Client_Username] && [currentEnvConfig objectForKey:Client_Password]) {
|
|
||||||
_currentOAuthUserName = [currentEnvConfig objectForKey:Client_Username];
|
|
||||||
_currentOAuthPassword = [currentEnvConfig objectForKey:Client_Password];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NSLogDebug(@"%@",[[_configuration objectForKey:_currentEnv] objectForKey:BaseUrl]);
|
NSLogDebug(@"%@",[[_configuration objectForKey:_currentEnv] objectForKey:BaseUrl]);
|
||||||
|
|
||||||
NSAssert(_currentUserCredenzialEndPointUrl,@"Selected environment generate error. Please check configuration");
|
NSAssert(_currentEndPointUrl,@"Selected environment generate error. Please check configuration");
|
||||||
|
|
||||||
if (_currentClientCredenzialClientID && _currentClientCredenzialClientSecret) {
|
if (_currentOAuthClientID && _currentOAuthClientSecret) {
|
||||||
[self clientCredentialAuthManager];
|
[self authManager];
|
||||||
|
|
||||||
|
[self manager];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_currentClientCredenzialClientID && _currentClientCredenzialClientSecret) {
|
|
||||||
|
|
||||||
[self userCredentialAuthManager];
|
|
||||||
}
|
|
||||||
[self manager];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (NSString * _Nonnull) getEnvironment {
|
- (NSString * _Nonnull) getEnvironment {
|
||||||
return _currentEnv;
|
return _currentEnv;
|
||||||
}
|
}
|
||||||
@ -332,125 +273,104 @@ static bool isFirstAccess = YES;
|
|||||||
|
|
||||||
for (NSString *key in [_headerFields allKeys]) {
|
for (NSString *key in [_headerFields allKeys]) {
|
||||||
|
|
||||||
[_managerHttpRequestSerializer setValue:[_headerFields objectForKey:key] forHTTPHeaderField:key];
|
[_httpSerializer setValue:[_headerFields objectForKey:key] forHTTPHeaderField:key];
|
||||||
[_managerJsonRequestSerializer setValue:[_headerFields objectForKey:key] forHTTPHeaderField:key];
|
[_jsonSerializer setValue:[_headerFields objectForKey:key] forHTTPHeaderField:key];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_currentOauthCredential && ![_currentOauthCredential isExpired] && ![[_manager requestSerializer] hasAuthorizationHeaderField]) {
|
||||||
|
|
||||||
|
[_httpSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_jsonSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_manager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[self refreshToken];
|
||||||
}
|
}
|
||||||
|
|
||||||
_manager.responseSerializer = [AFJSONResponseSerializerWithData serializer];
|
_manager.responseSerializer = [AFJSONResponseSerializerWithData serializer];
|
||||||
_manager.requestSerializer = _managerJsonRequestSerializer;
|
_manager.requestSerializer = _jsonSerializer;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _manager;
|
return _manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (AFOAuth2Manager *) clientCredentialAuthManager {
|
- (AFOAuth2Manager *) authManager {
|
||||||
|
|
||||||
BOOL canTryRefreh = NO;
|
BOOL canTryRefreh = NO;
|
||||||
|
|
||||||
if (!_clientCredentialAuthManager) {
|
if (!_authManager) {
|
||||||
_clientCredentialAuthManager = [AFOAuth2Manager manager];
|
_authManager = [AFOAuth2Manager manager];
|
||||||
|
|
||||||
if (_currentClientCredenzialClientID && _currentClientCredenzialClientSecret) {
|
switch (_oauthMode) {
|
||||||
|
case OAuthModeClientCredential:{
|
||||||
|
if (_currentOAuthClientID && _currentOAuthClientSecret) {
|
||||||
|
|
||||||
if (![_clientCredentialAuthManager clientID]) {
|
|
||||||
|
|
||||||
_clientCredentialAuthManager = [AFOAuth2Manager managerWithBaseURL:[NSURL URLWithString:_currentClientCredenzialEndPointUrl] clientID:_currentClientCredenzialClientID secret:_currentClientCredenzialClientSecret];
|
if (![_authManager clientID]) {
|
||||||
|
_authManager = [AFOAuth2Manager managerWithBaseURL:[NSURL URLWithString:_currentEndPointUrl] clientID:_currentOAuthClientID secret:_currentOAuthClientSecret];
|
||||||
|
}
|
||||||
|
|
||||||
|
[_authManager setUseHTTPBasicAuthentication:NO];
|
||||||
|
|
||||||
|
canTryRefreh = YES;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case OAuthModePassword:{
|
||||||
|
if (_currentOAuthClientID && _currentOAuthClientSecret && _currentOAuthUserName && _currentOAuthPassword) {
|
||||||
|
|
||||||
[_clientCredentialAuthManager setUseHTTPBasicAuthentication:NO];
|
if (![_authManager clientID]) {
|
||||||
|
_authManager = [AFOAuth2Manager managerWithBaseURL:[NSURL URLWithString:_currentEndPointUrl] clientID:_currentOAuthClientID secret:_currentOAuthClientSecret];
|
||||||
|
}
|
||||||
|
|
||||||
canTryRefreh = YES;
|
[_authManager setUseHTTPBasicAuthentication:NO];
|
||||||
|
|
||||||
|
canTryRefreh = YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OAuthModeNo:
|
||||||
|
default:{
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (NSString *key in [_headerFields allKeys]) {
|
for (NSString *key in [_headerFields allKeys]) {
|
||||||
|
|
||||||
[_oauthHttpRequestSerializer setValue:[_headerFields objectForKey:key] forHTTPHeaderField:key];
|
[_httpSerializer setValue:[_headerFields objectForKey:key] forHTTPHeaderField:key];
|
||||||
[_oauthJsonRequestSerializer setValue:[_headerFields objectForKey:key] forHTTPHeaderField:key];
|
[_jsonSerializer setValue:[_headerFields objectForKey:key] forHTTPHeaderField:key];
|
||||||
}
|
}
|
||||||
//[_oauthJsonRequestSerializer setValue:@"application/x-www-form-urlencoded; charset=UTF-8" forHTTPHeaderField:@"Content-Type"];
|
|
||||||
|
|
||||||
_clientCredentialAuthManager.responseSerializer = [AFJSONResponseSerializerWithData serializer];
|
if (canTryRefreh) {
|
||||||
_clientCredentialAuthManager.requestSerializer = _oauthJsonRequestSerializer;
|
|
||||||
|
|
||||||
AFOAuthCredential *credential = [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceClientCredentialIdentifier];
|
if (_currentOauthCredential && ![_currentOauthCredential isExpired] && ![[_manager requestSerializer] hasAuthorizationHeaderField]) {
|
||||||
|
|
||||||
if (credential && ![credential isExpired]) {
|
[_httpSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_jsonSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
[_oauthHttpRequestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
[_authManager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
[_oauthJsonRequestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
}
|
||||||
[_clientCredentialAuthManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
else {
|
||||||
}
|
[self refreshToken];
|
||||||
}
|
|
||||||
|
|
||||||
return _clientCredentialAuthManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (AFOAuth2Manager *) userCredentialAuthManager {
|
|
||||||
|
|
||||||
BOOL canTryRefreh = NO;
|
|
||||||
|
|
||||||
if (!_userCredentialAuthManager) {
|
|
||||||
_userCredentialAuthManager = [AFOAuth2Manager manager];
|
|
||||||
|
|
||||||
if ((_currentUserCredenzialClientID && _currentUserCredenzialClientID) || (_currentOAuthUserName && _currentOAuthPassword)) {
|
|
||||||
|
|
||||||
if (![_userCredentialAuthManager clientID]) {
|
|
||||||
_userCredentialAuthManager = [AFOAuth2Manager managerWithBaseURL:[NSURL URLWithString:_currentClientCredenzialEndPointUrl] clientID:_currentUserCredenzialClientID secret:_currentUserCredenzialClientSecret];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[_userCredentialAuthManager setUseHTTPBasicAuthentication:NO];
|
|
||||||
|
|
||||||
canTryRefreh = YES;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (NSString *key in [_headerFields allKeys]) {
|
_authManager.responseSerializer = [AFJSONResponseSerializerWithData serializer];
|
||||||
|
|
||||||
[_oauthJsonRequestSerializer setValue:[_headerFields objectForKey:key] forHTTPHeaderField:key];
|
|
||||||
[_oauthHttpRequestSerializer setValue:[_headerFields objectForKey:key] forHTTPHeaderField:key];
|
|
||||||
}
|
|
||||||
|
|
||||||
AFOAuthCredential *credential = [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceUserCredentialIdentifier];
|
|
||||||
|
|
||||||
if (credential && ![credential isExpired]) {
|
|
||||||
|
|
||||||
[_oauthHttpRequestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[_oauthJsonRequestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[_userCredentialAuthManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
}
|
|
||||||
|
|
||||||
_userCredentialAuthManager.responseSerializer = [AFJSONResponseSerializerWithData serializer];
|
|
||||||
_userCredentialAuthManager.requestSerializer = _oauthJsonRequestSerializer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return _userCredentialAuthManager;
|
return _authManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) resetTokenForOauthMode:(OAuthMode) oauthMode {
|
- (BOOL) resetToken {
|
||||||
switch (oauthMode) {
|
if (_currentOauthCredential) {
|
||||||
case OAuthModeClientCredential:
|
_currentOauthCredential = nil;
|
||||||
|
[AFOAuthCredential deleteCredentialWithIdentifier:PNObjectServiceClientCredentialIdentifier];
|
||||||
return [AFOAuthCredential deleteCredentialWithIdentifier:PNObjectServiceClientCredentialIdentifier];
|
return [AFOAuthCredential deleteCredentialWithIdentifier:PNObjectServiceUserCredentialIdentifier];
|
||||||
|
|
||||||
break;
|
|
||||||
case OAuthModePassword:
|
|
||||||
|
|
||||||
return [AFOAuthCredential deleteCredentialWithIdentifier:PNObjectServiceUserCredentialIdentifier];
|
|
||||||
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) resetAllTokens {
|
|
||||||
|
|
||||||
[self resetTokenForOauthMode:OAuthModeClientCredential];
|
|
||||||
[self resetTokenForOauthMode:OAuthModePassword];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) refreshToken {
|
- (void) refreshToken {
|
||||||
|
|
||||||
[self refreshTokenWithBlockSuccess:nil failure:nil];
|
[self refreshTokenWithBlockSuccess:nil failure:nil];
|
||||||
@ -472,209 +392,62 @@ static bool isFirstAccess = YES;
|
|||||||
[self refreshTokenForUserWithBlockSuccess:nil failure:nil];
|
[self refreshTokenForUserWithBlockSuccess:nil failure:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) refreshTokenForClientCredential {
|
|
||||||
[self refreshTokenForClientCredentialWithBlockSuccess:nil failure:nil];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) refreshTokenForClientCredentialWithBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success
|
|
||||||
failure:(nullable void (^)(NSError * _Nonnull error))failure {
|
|
||||||
[self refreshTokenForOauthMode:OAuthModeClientCredential retries:MAX_RETRIES WithBlockSuccess:success failure:failure];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) refreshTokenForUserWithBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success
|
- (void) refreshTokenForUserWithBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success
|
||||||
failure:(nullable void (^)(NSError * _Nonnull error))failure {
|
failure:(nullable void (^)(NSError * _Nonnull error))failure {
|
||||||
|
if (_currentOauthCredential) {
|
||||||
|
|
||||||
[self refreshTokenForOauthMode:OAuthModePassword retries:MAX_RETRIES WithBlockSuccess:success failure:failure];
|
[_authManager authenticateUsingOAuthWithURLString:[_currentEndPointUrl stringByAppendingString:@"oauth-token"] refreshToken:[_currentOauthCredential refreshToken] success:^(AFOAuthCredential * _Nonnull credential) {
|
||||||
}
|
_currentOauthCredential = credential;
|
||||||
|
|
||||||
- (void) refreshTokenForOauthMode:(OAuthMode) oauthMode
|
|
||||||
retries:(NSUInteger) retries
|
|
||||||
WithBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success
|
|
||||||
failure:(nullable void (^)(NSError * _Nonnull error))failure {
|
|
||||||
|
|
||||||
__block __typeof__(_managerHttpRequestSerializer) wHttpSerializer = _managerHttpRequestSerializer;
|
[AFOAuthCredential storeCredential:_currentOauthCredential withIdentifier:PNObjectServiceUserCredentialIdentifier];
|
||||||
__block __typeof__(_managerJsonRequestSerializer) wJsonSerializer = _managerJsonRequestSerializer;
|
|
||||||
__block __typeof__(_clientCredentialAuthManager) wClientCredentialAuthManager = _clientCredentialAuthManager;
|
|
||||||
__block __typeof__(_userCredentialAuthManager) wUserCredentialAuthManager = _userCredentialAuthManager;
|
|
||||||
__block __typeof__(_manager) wManager = _manager;
|
|
||||||
|
|
||||||
switch (oauthMode) {
|
[_httpSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
case OAuthModeClientCredential: {
|
[_jsonSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
AFOAuthCredential *credential = [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceClientCredentialIdentifier];
|
[_authManager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_manager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
|
||||||
if (credential && ![credential isExpired] && nil != [credential refreshToken] && _currentClientCredenzialRefreshTokenEnabled) {
|
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenUserSuccess object:nil];
|
||||||
|
|
||||||
[_clientCredentialAuthManager authenticateUsingOAuthWithURLString:_currentClientCredenzialEndPointUrl refreshToken:[credential refreshToken] success:^(AFOAuthCredential * _Nonnull credential) {
|
|
||||||
|
|
||||||
[AFOAuthCredential storeCredential:credential withIdentifier:PNObjectServiceClientCredentialIdentifier];
|
|
||||||
|
|
||||||
[wHttpSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wJsonSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wClientCredentialAuthManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenClientCredentialSuccess object:nil];
|
|
||||||
if (success) {
|
|
||||||
success(YES);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
} failure:^(NSError * _Nonnull error) {
|
|
||||||
|
|
||||||
if (retries > 0) {
|
|
||||||
[self refreshTokenForOauthMode:oauthMode retries:retries-1 WithBlockSuccess:success failure:failure];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (failure) {
|
|
||||||
failure(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[_clientCredentialAuthManager authenticateUsingOAuthWithURLString:_currentClientCredenzialEndPointUrl scope:@"" success:^(AFOAuthCredential * _Nonnull credential) {
|
|
||||||
|
|
||||||
[AFOAuthCredential storeCredential:credential withIdentifier:PNObjectServiceClientCredentialIdentifier];
|
|
||||||
|
|
||||||
[wHttpSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wJsonSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wClientCredentialAuthManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenClientCredentialSuccess object:nil];
|
|
||||||
if (success) {
|
|
||||||
success(YES);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
} failure:^(NSError * _Nonnull error) {
|
|
||||||
|
|
||||||
if (failure) {
|
|
||||||
failure(error);
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case OAuthModePassword:{
|
|
||||||
|
|
||||||
AFOAuthCredential *credential = [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceClientCredentialIdentifier];
|
|
||||||
|
|
||||||
if (credential && ![credential isExpired] && nil != [credential refreshToken] && _currentUserCredenzialRefreshTokenEnabled) {
|
|
||||||
|
|
||||||
[_userCredentialAuthManager authenticateUsingOAuthWithURLString:_currentClientCredenzialEndPointUrl refreshToken:[credential refreshToken] success:^(AFOAuthCredential * _Nonnull credential) {
|
|
||||||
|
|
||||||
[AFOAuthCredential storeCredential:credential withIdentifier:PNObjectServiceUserCredentialIdentifier];
|
|
||||||
|
|
||||||
[wHttpSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wJsonSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wUserCredentialAuthManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenClientCredentialSuccess object:nil];
|
|
||||||
if (success) {
|
|
||||||
success(YES);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
} failure:^(NSError * _Nonnull error) {
|
|
||||||
if (retries > 0) {
|
|
||||||
[self refreshTokenForOauthMode:oauthMode retries:retries-1 WithBlockSuccess:success failure:failure];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (failure) {
|
|
||||||
failure(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
if([SINGLETON_PNObjectConfig.userSubClass currentUser] && [[SINGLETON_PNObjectConfig.userSubClass currentUser] hasValidEmailAndPasswordData]) {
|
|
||||||
|
|
||||||
[self refreshTokenForUserWithEmail:[[SINGLETON_PNObjectConfig.userSubClass currentUser] email] password:[[(PNUser*)[SINGLETON_PNObjectConfig.userSubClass currentUser] password] password] withBlockSuccess:success failure:failure];
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if ([SINGLETON_PNObjectConfig.userSubClass currentUser] && [[SINGLETON_PNObjectConfig.userSubClass currentUser] facebookId]){
|
|
||||||
[FBSDKAccessToken refreshCurrentAccessToken:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
|
|
||||||
if (error) {
|
|
||||||
if (failure) {
|
|
||||||
failure(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[self refreshTokenForUserWithFacebookId:[[SINGLETON_PNObjectConfig.userSubClass currentUser] facebookId] facebookToken:[[FBSDKAccessToken currentAccessToken] tokenString] withBlockSuccess:success failure:failure];
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (failure) {
|
|
||||||
|
|
||||||
NSError *error = [NSError errorWithDomain:@"" code:kHTTPStatusCodeBadRequest userInfo:nil];
|
|
||||||
failure(error);
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenUserFail object:nil];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default: {
|
|
||||||
if (success) {
|
if (success) {
|
||||||
success(YES);
|
success(YES);
|
||||||
}
|
}
|
||||||
}
|
return;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) refreshTokenForUserWithFacebookId:(NSString * _Nonnull) facebookId
|
} failure:^(NSError * _Nonnull error) {
|
||||||
facebookToken:(NSString * _Nonnull) facebookToken
|
[self resetToken];
|
||||||
withBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success
|
|
||||||
failure:(nullable void (^)(NSError * _Nonnull error))failure {
|
[self refreshTokenForUserWithBlockSuccess:success failure:failure];
|
||||||
if (!facebookId || [facebookId length] == 0) {
|
return;
|
||||||
if (failure) {
|
}];
|
||||||
NSError *error = [NSError errorWithDomain:NSLocalizedString(@"Facebook id is not valid", @"") code:kHTTPStatusCodeBadRequest userInfo:nil];
|
|
||||||
failure(error);
|
}
|
||||||
|
else {
|
||||||
|
if([SINGLETON_PNObjectConfig.userSubClass currentUser] && [[SINGLETON_PNObjectConfig.userSubClass currentUser] hasValidEmailAndPasswordData]) {
|
||||||
|
|
||||||
|
[self refreshTokenForUserWithEmail:[[SINGLETON_PNObjectConfig.userSubClass currentUser] email] password:[[(PNUser*)[SINGLETON_PNObjectConfig.userSubClass currentUser] password] password] withBlockSuccess:success failure:failure];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
else if ([SINGLETON_PNObjectConfig.userSubClass currentUser] && [[SINGLETON_PNObjectConfig.userSubClass currentUser] facebookId]){
|
||||||
if (!facebookToken || [facebookToken length] == 0) {
|
[FBSDKAccessToken refreshCurrentAccessToken:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
|
||||||
if (failure) {
|
if (error) {
|
||||||
NSError *error = [NSError errorWithDomain:NSLocalizedString(@"Facebook token is not valid", @"") code:kHTTPStatusCodeBadRequest userInfo:nil];
|
if (failure) {
|
||||||
failure(error);
|
failure(error);
|
||||||
return;
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[self refreshTokenForUserWithFacebookId:[[SINGLETON_PNObjectConfig.userSubClass currentUser] facebookId] facebookToken:[[FBSDKAccessToken currentAccessToken] tokenString] withBlockSuccess:success failure:failure];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (failure) {
|
||||||
|
|
||||||
|
NSError *error = [NSError errorWithDomain:@"" code:kHTTPStatusCodeBadRequest userInfo:nil];
|
||||||
|
failure(error);
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenUserFail object:nil];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__block __typeof__(_managerHttpRequestSerializer) wHttpSerializer = _managerHttpRequestSerializer;
|
|
||||||
__block __typeof__(_managerJsonRequestSerializer) wJsonSerializer = _managerJsonRequestSerializer;
|
|
||||||
__block __typeof__(_manager) wManager = _manager;
|
|
||||||
__block __typeof__(_userCredentialAuthManager) wUserCredentialAuthManager = _userCredentialAuthManager;
|
|
||||||
|
|
||||||
[_userCredentialAuthManager authenticateUsingFacebookOAuthWithURLString:_currentClientCredenzialEndPointUrl facebookId:facebookId facebookToken:facebookToken scope:@"" success:^(AFOAuthCredential * _Nonnull credential) {
|
|
||||||
|
|
||||||
[AFOAuthCredential storeCredential:credential withIdentifier:PNObjectServiceUserCredentialIdentifier];
|
|
||||||
|
|
||||||
[wHttpSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wJsonSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wUserCredentialAuthManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenUserSuccess object:nil];
|
|
||||||
if (success) {
|
|
||||||
success(YES);
|
|
||||||
}
|
|
||||||
} failure:^(NSError * _Nonnull error) {
|
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenUserFail object:nil];
|
|
||||||
if (failure) {
|
|
||||||
failure(error);
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) refreshTokenForUserWithEmail:(NSString * _Nonnull) email
|
- (void) refreshTokenForUserWithEmail:(NSString * _Nonnull) email
|
||||||
@ -696,22 +469,16 @@ static bool isFirstAccess = YES;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[_authManager authenticateUsingOAuthWithURLString:[_currentEndPointUrl stringByAppendingString:@"oauth-token"] username:email password:password scope:nil success:^(AFOAuthCredential * _Nonnull credential) {
|
||||||
__block __typeof__(_managerHttpRequestSerializer) wHttpSerializer = _managerHttpRequestSerializer;
|
_currentOauthCredential = credential;
|
||||||
__block __typeof__(_managerJsonRequestSerializer) wJsonSerializer = _managerJsonRequestSerializer;
|
|
||||||
__block __typeof__(_manager) wManager = _manager;
|
|
||||||
__block __typeof__(_userCredentialAuthManager) wUserCredentialAuthManager = _userCredentialAuthManager;
|
|
||||||
|
|
||||||
|
|
||||||
[_userCredentialAuthManager authenticateUsingOAuthWithURLString:_currentClientCredenzialEndPointUrl username:email password:password scope:@"" success:^(AFOAuthCredential * _Nonnull credential) {
|
[AFOAuthCredential storeCredential:_currentOauthCredential withIdentifier:PNObjectServiceUserCredentialIdentifier];
|
||||||
|
|
||||||
[AFOAuthCredential storeCredential:credential withIdentifier:PNObjectServiceUserCredentialIdentifier];
|
|
||||||
|
|
||||||
[wHttpSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wJsonSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wUserCredentialAuthManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
|
|
||||||
|
[_httpSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_jsonSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_authManager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_manager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenUserSuccess object:nil];
|
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenUserSuccess object:nil];
|
||||||
if (success) {
|
if (success) {
|
||||||
@ -726,34 +493,34 @@ static bool isFirstAccess = YES;
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) refreshTokenForUserWithUsername:(NSString * _Nonnull) username
|
- (void) refreshTokenForUserWithFacebookId:(NSString * _Nonnull) facebookId
|
||||||
password:(NSString * _Nonnull) password
|
facebookToken:(NSString * _Nonnull) facebookToken
|
||||||
withBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success
|
withBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success
|
||||||
failure:(nullable void (^)(NSError * _Nonnull error))failure {
|
failure:(nullable void (^)(NSError * _Nonnull error))failure {
|
||||||
|
if (!facebookId || [facebookId length] == 0) {
|
||||||
if (![SINGLETON_PNObjectConfig.userSubClass isValidPassword:password]) {
|
|
||||||
if (failure) {
|
if (failure) {
|
||||||
NSError *error = [NSError errorWithDomain:NSLocalizedString(@"Password is not valid", @"") code:kHTTPStatusCodeBadRequest userInfo:nil];
|
NSError *error = [NSError errorWithDomain:NSLocalizedString(@"Facebook id is not valid", @"") code:kHTTPStatusCodeBadRequest userInfo:nil];
|
||||||
|
failure(error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!facebookToken || [facebookToken length] == 0) {
|
||||||
|
if (failure) {
|
||||||
|
NSError *error = [NSError errorWithDomain:NSLocalizedString(@"Facebook token is not valid", @"") code:kHTTPStatusCodeBadRequest userInfo:nil];
|
||||||
failure(error);
|
failure(error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__block __typeof__(_managerHttpRequestSerializer) wHttpSerializer = _managerHttpRequestSerializer;
|
[_authManager authenticateUsingFacebookOAuthWithURLString:[_currentEndPointUrl stringByAppendingString:@"oauth-token"] facebookId:facebookId facebookToken:facebookToken scope:nil success:^(AFOAuthCredential * _Nonnull credential) {
|
||||||
__block __typeof__(_managerJsonRequestSerializer) wJsonSerializer = _managerJsonRequestSerializer;
|
_currentOauthCredential = credential;
|
||||||
__block __typeof__(_manager) wManager = _manager;
|
|
||||||
__block __typeof__(_userCredentialAuthManager) wUserCredentialAuthManager = _userCredentialAuthManager;
|
|
||||||
|
|
||||||
|
[AFOAuthCredential storeCredential:_currentOauthCredential withIdentifier:PNObjectServiceUserCredentialIdentifier];
|
||||||
|
|
||||||
[_userCredentialAuthManager authenticateUsingOAuthWithURLString:_currentClientCredenzialEndPointUrl username:username password:password scope:@"" success:^(AFOAuthCredential * _Nonnull credential) {
|
[_httpSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_jsonSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
[AFOAuthCredential storeCredential:credential withIdentifier:PNObjectServiceUserCredentialIdentifier];
|
[_authManager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_manager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
[wHttpSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wJsonSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wUserCredentialAuthManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[wManager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
|
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenUserSuccess object:nil];
|
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenUserSuccess object:nil];
|
||||||
if (success) {
|
if (success) {
|
||||||
@ -768,6 +535,98 @@ static bool isFirstAccess = YES;
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) refreshTokenForClientCredential {
|
||||||
|
[self refreshTokenForClientCredentialWithBlockSuccess:nil failure:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void) refreshTokenForClientCredentialWithBlockSuccess:(nullable void (^)(BOOL refreshSuccess))success
|
||||||
|
failure:(nullable void (^)(NSError * _Nonnull error))failure {
|
||||||
|
|
||||||
|
if (_currentOauthCredential) {
|
||||||
|
|
||||||
|
[_authManager authenticateUsingOAuthWithURLString:[_currentEndPointUrl stringByAppendingString:@"oauth-token"] refreshToken:[_currentOauthCredential refreshToken] success:^(AFOAuthCredential * _Nonnull credential) {
|
||||||
|
_currentOauthCredential = credential;
|
||||||
|
|
||||||
|
[AFOAuthCredential storeCredential:_currentOauthCredential withIdentifier:PNObjectServiceClientCredentialIdentifier];
|
||||||
|
|
||||||
|
[_httpSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_jsonSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_authManager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_manager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenClientCredentialSuccess object:nil];
|
||||||
|
if (success) {
|
||||||
|
success(YES);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
} failure:^(NSError * _Nonnull error) {
|
||||||
|
[self resetToken];
|
||||||
|
|
||||||
|
[self refreshTokenForClientCredentialWithBlockSuccess:success failure:failure];
|
||||||
|
return;
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
switch (_oauthMode) {
|
||||||
|
case OAuthModeClientCredential:{
|
||||||
|
[_authManager authenticateUsingOAuthWithURLString:[_currentEndPointUrl stringByAppendingString:@"oauth-token"] scope:nil success:^(AFOAuthCredential * _Nonnull credential) {
|
||||||
|
_currentOauthCredential = credential;
|
||||||
|
|
||||||
|
[AFOAuthCredential storeCredential:_currentOauthCredential withIdentifier:PNObjectServiceClientCredentialIdentifier];
|
||||||
|
|
||||||
|
[_httpSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_jsonSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_authManager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_manager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenClientCredentialSuccess object:nil];
|
||||||
|
if (success) {
|
||||||
|
success(YES);
|
||||||
|
}
|
||||||
|
|
||||||
|
} failure:^(NSError * _Nonnull error) {
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenClientCredentialFail object:nil];
|
||||||
|
if (failure) {
|
||||||
|
failure(error);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OAuthModePassword:{
|
||||||
|
|
||||||
|
[_authManager authenticateUsingOAuthWithURLString:[_currentEndPointUrl stringByAppendingString:@"oauth-token"] username:_currentOAuthUserName password:_currentOAuthPassword scope:nil success:^(AFOAuthCredential * _Nonnull credential) {
|
||||||
|
_currentOauthCredential = credential;
|
||||||
|
|
||||||
|
[AFOAuthCredential storeCredential:_currentOauthCredential withIdentifier:PNObjectServiceClientCredentialIdentifier];
|
||||||
|
|
||||||
|
[_httpSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_jsonSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_authManager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
[_manager.requestSerializer setAuthorizationHeaderFieldWithCredential:_currentOauthCredential];
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenClientCredentialSuccess object:nil];
|
||||||
|
if (success) {
|
||||||
|
success(YES);
|
||||||
|
}
|
||||||
|
|
||||||
|
} failure:^(NSError * _Nonnull error) {
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationRefreshTokenClientCredentialFail object:nil];
|
||||||
|
if (failure) {
|
||||||
|
failure(error);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OAuthModeNo:
|
||||||
|
default:
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void) setAcceptablePasswordLenght:(NSUInteger) passLenght {
|
- (void) setAcceptablePasswordLenght:(NSUInteger) passLenght {
|
||||||
_minPasswordLenght = passLenght;
|
_minPasswordLenght = passLenght;
|
||||||
@ -783,28 +642,13 @@ static bool isFirstAccess = YES;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setClientID:(NSString * _Nonnull) clientID clientSecret:(NSString* _Nonnull) clientSecret oAuthEndpointAction:(NSString* _Nonnull) oAuthEndpointAction oauthMode:(OAuthMode) oauthMode refreshTokenEnabled:(BOOL) refreshTokenEnabled forEnv:(NSString * _Nonnull) environment {
|
- (void) setClientID:(NSString * _Nonnull) clientID clientSecret:(NSString* _Nonnull) clientSecret forEnv:(NSString *) environment {
|
||||||
|
|
||||||
if ([_configuration objectForKey:environment]) {
|
if ([_configuration objectForKey:environment]) {
|
||||||
|
|
||||||
NSMutableDictionary *currentConfigurationDict = [[NSMutableDictionary alloc] initWithDictionary:[_configuration objectForKey:environment]];
|
NSMutableDictionary *currentConfigurationDict = [[NSMutableDictionary alloc] initWithDictionary:[_configuration objectForKey:environment]];
|
||||||
switch (oauthMode) {
|
[currentConfigurationDict setObject:clientID forKey:Client_ID];
|
||||||
case OAuthModeClientCredential:
|
[currentConfigurationDict setObject:clientSecret forKey:Client_Secret];
|
||||||
[currentConfigurationDict setObject:clientID forKey:Client_Credential_ID];
|
|
||||||
[currentConfigurationDict setObject:clientSecret forKey:Client_Credential_Secret];
|
|
||||||
[currentConfigurationDict setObject:oAuthEndpointAction forKey:Client_Credential_EndpointAction];
|
|
||||||
[currentConfigurationDict setObject:[NSNumber numberWithBool:refreshTokenEnabled] forKey:Client_Credential_Refresh_Token_Enabled];
|
|
||||||
break;
|
|
||||||
case OAuthModePassword:{
|
|
||||||
[currentConfigurationDict setObject:clientID forKey:Client_ID];
|
|
||||||
[currentConfigurationDict setObject:clientSecret forKey:Client_Secret];
|
|
||||||
[currentConfigurationDict setObject:oAuthEndpointAction forKey:Client_EndpointAction];
|
|
||||||
[currentConfigurationDict setObject:[NSNumber numberWithBool:refreshTokenEnabled] forKey:Client_Refresh_Token_Enabled];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
[_configuration setObject:currentConfigurationDict forKey:environment];
|
[_configuration setObject:currentConfigurationDict forKey:environment];
|
||||||
|
|
||||||
@ -830,46 +674,4 @@ static bool isFirstAccess = YES;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) setCredentialTokenForOauthMode:(OAuthMode) oauthMode {
|
|
||||||
|
|
||||||
switch (oauthMode) {
|
|
||||||
case OAuthModeClientCredential:{
|
|
||||||
|
|
||||||
AFOAuthCredential *credential = [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceClientCredentialIdentifier];
|
|
||||||
if (!credential || (credential && [credential isExpired])) {
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
[_managerHttpRequestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[_managerJsonRequestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[_manager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case OAuthModePassword:{
|
|
||||||
|
|
||||||
AFOAuthCredential *credential = [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceUserCredentialIdentifier];
|
|
||||||
if (!credential || (credential && [credential isExpired])) {
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
[_managerHttpRequestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[_managerJsonRequestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
[_manager.requestSerializer setAuthorizationHeaderFieldWithCredential:credential];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default: {
|
|
||||||
[_managerHttpRequestSerializer setValue:@"" forHTTPHeaderField:@"Authorization"];
|
|
||||||
[_managerJsonRequestSerializer setValue:@"" forHTTPHeaderField:@"Authorization"];
|
|
||||||
[_manager.requestSerializer setValue:@"" forHTTPHeaderField:@"Authorization"];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
- (AFOAuthCredential * _Nullable) currentOauthClientCredential {
|
|
||||||
return [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceClientCredentialIdentifier];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (AFOAuthCredential * _Nullable) currentOauthUserCredential {
|
|
||||||
return [AFOAuthCredential retrieveCredentialWithIdentifier:PNObjectServiceUserCredentialIdentifier];
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#import "AFOAuth2Manager.h"
|
#import "AFOAuth2Manager.h"
|
||||||
#import "AFOAuthCredential.h"
|
#import "AFOAuthCredential.h"
|
||||||
#import "NSDate+NSDate_Util.h"
|
|
||||||
|
|
||||||
NSString * const kAFOAuthClientCredentialsGrantType = @"client_credentials";
|
NSString * const kAFOAuthClientCredentialsGrantType = @"client_credentials";
|
||||||
NSString * const kAFOAuthPasswordCredentialsGrantType = @"password";
|
NSString * const kAFOAuthPasswordCredentialsGrantType = @"password";
|
||||||
@ -276,7 +275,7 @@ static NSError * AFErrorFromRFC6749Section5_2Error(id object) {
|
|||||||
NSDate *expireDate = [NSDate distantFuture];
|
NSDate *expireDate = [NSDate distantFuture];
|
||||||
id expiresIn = [responseObject valueForKey:@"expires_in"];
|
id expiresIn = [responseObject valueForKey:@"expires_in"];
|
||||||
if (expiresIn && ![expiresIn isEqual:[NSNull null]]) {
|
if (expiresIn && ![expiresIn isEqual:[NSNull null]]) {
|
||||||
expireDate = [[NSDate date] dateByAddingMinutes:[expiresIn integerValue]/60];
|
expireDate = [NSDate dateWithTimeIntervalSinceNow:[expiresIn doubleValue]];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (expireDate) {
|
if (expireDate) {
|
||||||
|
|||||||
14
README.md
14
README.md
@ -37,12 +37,12 @@ Configure PNObject endpoint client ID, client secret and OAuthModePassword with
|
|||||||
[PNObjectConfig initSharedInstanceForEnvironments:@{EnvironmentDevelopment : @{BaseUrl:@"http://pnobject.local/",EndpointPath:@"api/v1/"},
|
[PNObjectConfig initSharedInstanceForEnvironments:@{EnvironmentDevelopment : @{BaseUrl:@"http://pnobject.local/",EndpointPath:@"api/v1/"},
|
||||||
EnvironmentStage : @{BaseUrl:@"http://pnobject.stage.it/",EndpointPath:@"api/v1/"},
|
EnvironmentStage : @{BaseUrl:@"http://pnobject.stage.it/",EndpointPath:@"api/v1/"},
|
||||||
EnvironmentProduction : @{BaseUrl:@"http://pnobject.prod.it/",EndpointPath:@"api/v1/"},
|
EnvironmentProduction : @{BaseUrl:@"http://pnobject.prod.it/",EndpointPath:@"api/v1/"},
|
||||||
} userSubclass:[PNUser class]];
|
} userSubclass:[PNUser class] withOauthMode:OAuthModeClientCredential];
|
||||||
|
|
||||||
|
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentStage];
|
||||||
|
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentProduction];
|
||||||
|
|
||||||
|
|
||||||
/** Can user special char %@ to autoset EndpointPath to Oauth endpointPath */
|
|
||||||
[[PNObjectConfig sharedInstance] setClientID:@"******" clientSecret:@"******" oAuthEndpointAction:@"%@oauth-token" oauthMode:OAuthModeClientCredential forEnv:EnvironmentStage];
|
|
||||||
[[PNObjectConfig sharedInstance] setClientID:@"******" clientSecret:@"******" oAuthEndpointAction:@"%@oauth-token" oauthMode:OAuthModePassword forEnv:EnvironmentStage];
|
|
||||||
|
|
||||||
[[PNObjectConfig sharedInstance] setOauthUserName:@"admin" oauthPassword:@"admin" forEnv:EnvironmentStage];
|
[[PNObjectConfig sharedInstance] setOauthUserName:@"admin" oauthPassword:@"admin" forEnv:EnvironmentStage];
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ Configure PNObject endpoint client ID, client secret and OAuthModePassword
|
|||||||
[PNObjectConfig initSharedInstanceForEnvironments:@{EnvironmentDevelopment : @"http://pnobject.local/api/v1/",
|
[PNObjectConfig initSharedInstanceForEnvironments:@{EnvironmentDevelopment : @"http://pnobject.local/api/v1/",
|
||||||
EnvironmentStage : @"http://pnobject.stage.it/api/v1/",
|
EnvironmentStage : @"http://pnobject.stage.it/api/v1/",
|
||||||
EnvironmentProduction : @"http://pnobject.prod.it/api/v1/"
|
EnvironmentProduction : @"http://pnobject.prod.it/api/v1/"
|
||||||
} userSubclass:[PNUser class]];
|
} userSubclass:[PNUser class] withOauthMode:OAuthModePassword];
|
||||||
|
|
||||||
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentStage];
|
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentStage];
|
||||||
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentProduction];
|
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentProduction];
|
||||||
@ -95,7 +95,7 @@ Configure PNObject endpoint client ID, client secret and OAuthModeClientCredenti
|
|||||||
[PNObjectConfig initSharedInstanceForEnvironments:@{EnvironmentDevelopment : @"http://pnobject.local/api/v1/",
|
[PNObjectConfig initSharedInstanceForEnvironments:@{EnvironmentDevelopment : @"http://pnobject.local/api/v1/",
|
||||||
EnvironmentStage : @"http://pnobject.stage.it/api/v1/",
|
EnvironmentStage : @"http://pnobject.stage.it/api/v1/",
|
||||||
EnvironmentProduction : @"http://pnobject.prod.it/api/v1/"
|
EnvironmentProduction : @"http://pnobject.prod.it/api/v1/"
|
||||||
} userSubclass:[PNUser class]];
|
} userSubclass:[PNUser class] withOauthMode:OAuthModeClientCredential];
|
||||||
|
|
||||||
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentStage];
|
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentStage];
|
||||||
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentProduction];
|
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentProduction];
|
||||||
@ -114,7 +114,7 @@ Configure PNObject endpoint and using custom PNUser object
|
|||||||
[PNObjectConfig initSharedInstanceForEnvironments:@{EnvironmentDevelopment : @"http://pnobject.local/api/v1/",
|
[PNObjectConfig initSharedInstanceForEnvironments:@{EnvironmentDevelopment : @"http://pnobject.local/api/v1/",
|
||||||
EnvironmentStage : @"http://pnobject.stage.it/api/v1/",
|
EnvironmentStage : @"http://pnobject.stage.it/api/v1/",
|
||||||
EnvironmentProduction : @"http://pnobject.prod.it/api/v1/"
|
EnvironmentProduction : @"http://pnobject.prod.it/api/v1/"
|
||||||
} userSubclass:[PNUser class]];
|
} userSubclass:[PNUser class] withOauthMode:OAuthModeClientCredential];
|
||||||
|
|
||||||
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentStage];
|
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentStage];
|
||||||
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentProduction];
|
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentProduction];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user