Compare commits

..

No commits in common. "2.5.7" and "master" have entirely different histories.

134 changed files with 5218 additions and 7321 deletions

View File

@ -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; };
@ -210,6 +210,7 @@
6003F586195388D20070C39A /* Sources */, 6003F586195388D20070C39A /* Sources */,
6003F587195388D20070C39A /* Frameworks */, 6003F587195388D20070C39A /* Frameworks */,
6003F588195388D20070C39A /* Resources */, 6003F588195388D20070C39A /* Resources */,
C40CC8D7B1996A567BE82827 /* [CP] Embed Pods Frameworks */,
614EA73ED5E0ED0F8684468C /* [CP] Copy Pods Resources */, 614EA73ED5E0ED0F8684468C /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
@ -229,6 +230,8 @@
6003F5AA195388D20070C39A /* Sources */, 6003F5AA195388D20070C39A /* Sources */,
6003F5AB195388D20070C39A /* Frameworks */, 6003F5AB195388D20070C39A /* Frameworks */,
6003F5AC195388D20070C39A /* Resources */, 6003F5AC195388D20070C39A /* Resources */,
746A765B48FD98342716D81F /* [CP] Embed Pods Frameworks */,
21411FBE0FE21EC75B6AB1E3 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -304,6 +307,21 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
21411FBE0FE21EC75B6AB1E3 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
3FF38AA7E586B22171D1A118 /* [CP] Check Pods Manifest.lock */ = { 3FF38AA7E586B22171D1A118 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
@ -333,13 +351,43 @@
); );
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;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example-resources.sh\"\n"; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example-resources.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
746A765B48FD98342716D81F /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
C40CC8D7B1996A567BE82827 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
E4CE079F616C61EA34D08B8B /* [CP] Check Pods Manifest.lock */ = { E4CE079F616C61EA34D08B8B /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -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,23 +34,21 @@
// 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]);
[[PNObjectConfig sharedInstance] loadManagersWithCredentials];
PNObjViewController *viewController = [[PNObjViewController alloc] init]; PNObjViewController *viewController = [[PNObjViewController alloc] init];

View File

@ -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 {

View File

@ -1,13 +1,13 @@
platform :ios, '9.0' platform :ios, '9.0'
target 'PNObject_Example' do target 'PNObject_Example' do
pod 'PNObject', :path => '../' pod 'PNObject', :path => '../'
pod 'PureLayout' pod 'PureLayout'
target 'PNObject_Tests' do target 'PNObject_Tests' do
inherit! :search_paths inherit! :search_paths
pod 'Specta' pod 'Specta'
pod 'Expecta' pod 'Expecta'
end end
end end

View File

@ -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.33.0): - FBSDKCoreKit (4.29.0):
- Bolts (~> 1.7) - Bolts (~> 1.7)
- FBSDKLoginKit (4.33.0): - FBSDKLoginKit (4.29.0):
- FBSDKCoreKit
- FBSDKShareKit (4.29.0):
- FBSDKCoreKit - FBSDKCoreKit
- FBSDKShareKit (4.33.0):
- FBSDKCoreKit (~> 4.33.0)
- NSDataAES (0.2.2) - NSDataAES (0.2.2)
- NSDate_Utils (1.1.0): - NSDate_Utils (1.1.0):
- DJLocalization - DJLocalization
- NSString-Helper (1.1.0) - 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.5.7): - 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.8) - UIDevice-Utils (1.0.0)
DEPENDENCIES: DEPENDENCIES:
- Expecta - Expecta
@ -66,54 +66,32 @@ DEPENDENCIES:
- PureLayout - PureLayout
- Specta - Specta
SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- AFNetworking
- Bolts
- CodFis-Helper
- DDDKeychainWrapper
- DJLocalization
- Expecta
- FBSDKCoreKit
- FBSDKLoginKit
- FBSDKShareKit
- NSDataAES
- NSDate_Utils
- NSString-Helper
- nv-ios-http-status
- PEAR-FileManager-iOS
- PureLayout
- RZDataBinding
- Specta
- StrongestPasswordValidator
- UIDevice-Utils
EXTERNAL SOURCES: EXTERNAL SOURCES:
PNObject: PNObject:
: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: 572b047a7e029bc44542bcf8a59414e7ff2b543e FBSDKCoreKit: 6f139173dc63a1deaff4430a55f2fe5bb222d2af
FBSDKLoginKit: 88cb456349cfb3b554427ce4f8b43729d85dfb40 FBSDKLoginKit: 56a057ca6822535ea0faa25f57a7c41edb697fd4
FBSDKShareKit: b7b5002833a4104fbecad75e8e4e082e91c7a08a FBSDKShareKit: 18a2cd118aef11dd657fe7e8b64bae5c719088b2
NSDataAES: 967ea3337476a80e9838a533c25d570a06855ed0 NSDataAES: 967ea3337476a80e9838a533c25d570a06855ed0
NSDate_Utils: c858a89da6e204ecf53aca48dbccb4da4d25bc9e NSDate_Utils: c858a89da6e204ecf53aca48dbccb4da4d25bc9e
NSString-Helper: 645162758421206f509cb46cbd10023eab7594ed NSString-Helper: 459e1b6a62b3bf7db10f01b0d102548608e945c4
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3 PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
PNObject: 524a8d655fb150c0da2f262441bbbe24dd9bd8b9 PNObject: 8dc560680a7a48060ed309b019ca4fc41505cc07
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109 RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7 StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
UIDevice-Utils: a629b53a88c1429cfb4bdff35b18287feebd164a UIDevice-Utils: ff37bd042127117572d6ce4c5ff074f4f54ab5ed
PODFILE CHECKSUM: eec9c921f7aee591fd1fdea1fd3e5a191b74a436 PODFILE CHECKSUM: fcd5d1cf3426c7c9c5b3e5edcd4b8e5402ee7f2e
COCOAPODS: 1.5.0 COCOAPODS: 1.3.1

View File

@ -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
///--------------------- ///---------------------

View File

@ -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;

View File

@ -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
///-------------------------------------------------- ///--------------------------------------------------

View File

@ -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);
} }

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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:`.

View File

@ -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);
} }

View File

@ -1,4 +1,4 @@
Copyright (c) 2011-2016 Alamofire Software Foundation (http://alamofire.org/) Copyright (c) 20112016 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

View File

@ -9,7 +9,7 @@
[![Platform](https://img.shields.io/cocoapods/p/AFNetworking.svg?style=flat)](http://cocoadocs.org/docsets/AFNetworking) [![Platform](https://img.shields.io/cocoapods/p/AFNetworking.svg?style=flat)](http://cocoadocs.org/docsets/AFNetworking)
[![Twitter](https://img.shields.io/badge/twitter-@AFNetworking-blue.svg?style=flat)](http://twitter.com/AFNetworking) [![Twitter](https://img.shields.io/badge/twitter-@AFNetworking-blue.svg?style=flat)](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.

View File

@ -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.

View File

@ -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

View File

@ -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.

View File

@ -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) {

View File

@ -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"];
} }
} }

View File

@ -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
}); });
} }

View File

@ -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 {

View File

@ -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 {

View File

@ -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];

View File

@ -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
}); });
} }

View File

@ -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];

View File

@ -60,12 +60,6 @@ FBSDK_EXTERN NSString *const FBSDKAccessTokenChangeOldKey;
*/ */
FBSDK_EXTERN NSString *const FBSDKAccessTokenChangeNewKey; FBSDK_EXTERN NSString *const FBSDKAccessTokenChangeNewKey;
/*
A key in the notification's userInfo that will be set
if and only if the token has expired.
*/
FBSDK_EXTERN NSString *const FBSDKAccessTokenDidExpire;
/** /**
Represents an immutable access token for using Facebook services. Represents an immutable access token for using Facebook services.
@ -107,11 +101,6 @@ FBSDK_EXTERN NSString *const FBSDKAccessTokenDidExpire;
*/ */
@property (readonly, copy, nonatomic) NSString *userID; @property (readonly, copy, nonatomic) NSString *userID;
/**
Returns whether the access token is expired by checking its expirationDate property
*/
@property (readonly, assign, nonatomic, getter = isExpired) BOOL expired;
- (instancetype)init NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE;
@ -161,12 +150,6 @@ NS_DESIGNATED_INITIALIZER;
*/ */
+ (FBSDKAccessToken *)currentAccessToken; + (FBSDKAccessToken *)currentAccessToken;
/**
Returns YES if currentAccessToken is not nil AND currentAccessToken is not expired
*/
+ (BOOL)currentAccessTokenIsActive;
/** /**
Sets the "global" access token that represents the currently logged in user. Sets the "global" access token that represents the currently logged in user.
- Parameter token: The access token to set. - Parameter token: The access token to set.

View File

@ -27,7 +27,6 @@ NSString *const FBSDKAccessTokenDidChangeNotification = @"com.facebook.sdk.FBSDK
NSString *const FBSDKAccessTokenDidChangeUserID = @"FBSDKAccessTokenDidChangeUserID"; NSString *const FBSDKAccessTokenDidChangeUserID = @"FBSDKAccessTokenDidChangeUserID";
NSString *const FBSDKAccessTokenChangeNewKey = @"FBSDKAccessToken"; NSString *const FBSDKAccessTokenChangeNewKey = @"FBSDKAccessToken";
NSString *const FBSDKAccessTokenChangeOldKey = @"FBSDKAccessTokenOld"; NSString *const FBSDKAccessTokenChangeOldKey = @"FBSDKAccessTokenOld";
NSString *const FBSDKAccessTokenDidExpire = @"FBSDKAccessTokenDidExpire";
static FBSDKAccessToken *g_currentAccessToken; static FBSDKAccessToken *g_currentAccessToken;
@ -71,11 +70,6 @@ static FBSDKAccessToken *g_currentAccessToken;
return [self.permissions containsObject:permission]; return [self.permissions containsObject:permission];
} }
- (BOOL)isExpired
{
return [self.expirationDate compare:NSDate.date] == NSOrderedAscending;
}
+ (FBSDKAccessToken *)currentAccessToken + (FBSDKAccessToken *)currentAccessToken
{ {
return g_currentAccessToken; return g_currentAccessToken;
@ -87,8 +81,7 @@ static FBSDKAccessToken *g_currentAccessToken;
NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
[FBSDKInternalUtility dictionary:userInfo setObject:token forKey:FBSDKAccessTokenChangeNewKey]; [FBSDKInternalUtility dictionary:userInfo setObject:token forKey:FBSDKAccessTokenChangeNewKey];
[FBSDKInternalUtility dictionary:userInfo setObject:g_currentAccessToken forKey:FBSDKAccessTokenChangeOldKey]; [FBSDKInternalUtility dictionary:userInfo setObject:g_currentAccessToken forKey:FBSDKAccessTokenChangeOldKey];
// We set this flag also when the current Access Token was not valid, since there might be legacy code relying on it if (![g_currentAccessToken.userID isEqualToString:token.userID]) {
if (![g_currentAccessToken.userID isEqualToString:token.userID] || ![self currentAccessTokenIsActive]) {
userInfo[FBSDKAccessTokenDidChangeUserID] = @YES; userInfo[FBSDKAccessTokenDidChangeUserID] = @YES;
} }
@ -107,12 +100,6 @@ static FBSDKAccessToken *g_currentAccessToken;
} }
} }
+ (BOOL)currentAccessTokenIsActive
{
FBSDKAccessToken *currentAccessToken = [self currentAccessToken];
return currentAccessToken != nil && !currentAccessToken.isExpired;
}
+ (void)refreshCurrentAccessToken:(FBSDKGraphRequestHandler)completionHandler + (void)refreshCurrentAccessToken:(FBSDKGraphRequestHandler)completionHandler
{ {
if ([FBSDKAccessToken currentAccessToken]) { if ([FBSDKAccessToken currentAccessToken]) {

View File

@ -122,7 +122,6 @@ NSString *const FBSDKAppEventNameFBSDKLikeButtonImpression = @"fb_like_bu
NSString *const FBSDKAppEventNameFBSDKLoginButtonImpression = @"fb_login_button_impression"; NSString *const FBSDKAppEventNameFBSDKLoginButtonImpression = @"fb_login_button_impression";
NSString *const FBSDKAppEventNameFBSDKSendButtonImpression = @"fb_send_button_impression"; NSString *const FBSDKAppEventNameFBSDKSendButtonImpression = @"fb_send_button_impression";
NSString *const FBSDKAppEventNameFBSDKShareButtonImpression = @"fb_share_button_impression"; NSString *const FBSDKAppEventNameFBSDKShareButtonImpression = @"fb_share_button_impression";
NSString *const FBSDKAppEventNameFBSDKLiveStreamingButtonImpression = @"fb_live_streaming_button_impression";
NSString *const FBSDKAppEventNameFBSDKSmartLoginService = @"fb_smart_login_service"; NSString *const FBSDKAppEventNameFBSDKSmartLoginService = @"fb_smart_login_service";
@ -130,7 +129,6 @@ NSString *const FBSDKAppEventNameFBSDKLikeButtonDidTap = @"fb_like_button_did_t
NSString *const FBSDKAppEventNameFBSDKLoginButtonDidTap = @"fb_login_button_did_tap"; NSString *const FBSDKAppEventNameFBSDKLoginButtonDidTap = @"fb_login_button_did_tap";
NSString *const FBSDKAppEventNameFBSDKSendButtonDidTap = @"fb_send_button_did_tap"; NSString *const FBSDKAppEventNameFBSDKSendButtonDidTap = @"fb_send_button_did_tap";
NSString *const FBSDKAppEventNameFBSDKShareButtonDidTap = @"fb_share_button_did_tap"; NSString *const FBSDKAppEventNameFBSDKShareButtonDidTap = @"fb_share_button_did_tap";
NSString *const FBSDKAppEventNameFBSDKLiveStreamingButtonDidTap = @"fb_live_streaming_button_did_tap";
NSString *const FBSDKAppEventNameFBSDKLikeControlDidDisable = @"fb_like_control_did_disable"; NSString *const FBSDKAppEventNameFBSDKLikeControlDidDisable = @"fb_like_control_did_disable";
NSString *const FBSDKAppEventNameFBSDKLikeControlDidLike = @"fb_like_control_did_like"; NSString *const FBSDKAppEventNameFBSDKLikeControlDidLike = @"fb_like_control_did_like";
@ -151,16 +149,6 @@ NSString *const FBSDKAppEventNameFBSDKEventAppInviteShareDialogShow = @"fb_app
NSString *const FBSDKAppEventNameFBSessionFASLoginDialogResult = @"fb_mobile_login_fas_dialog_result"; NSString *const FBSDKAppEventNameFBSessionFASLoginDialogResult = @"fb_mobile_login_fas_dialog_result";
NSString *const FBSDKAppEventNameFBSDKLiveStreamingStart = @"fb_sdk_live_streaming_start";
NSString *const FBSDKAppEventNameFBSDKLiveStreamingStop = @"fb_sdk_live_streaming_stop";
NSString *const FBSDKAppEventNameFBSDKLiveStreamingPause = @"fb_sdk_live_streaming_pause";
NSString *const FBSDKAppEventNameFBSDKLiveStreamingResume = @"fb_sdk_live_streaming_resume";
NSString *const FBSDKAppEventNameFBSDKLiveStreamingError = @"fb_sdk_live_streaming_error";
NSString *const FBSDKAppEventNameFBSDKLiveStreamingUpdateStatus = @"fb_sdk_live_streaming_update_status";
NSString *const FBSDKAppEventNameFBSDKLiveStreamingVideoID = @"fb_sdk_live_streaming_video_id";
NSString *const FBSDKAppEventNameFBSDKLiveStreamingMic = @"fb_sdk_live_streaming_mic";
NSString *const FBSDKAppEventNameFBSDKLiveStreamingCamera = @"fb_sdk_live_streaming_camera";
// Event Parameters internal to this file // Event Parameters internal to this file
NSString *const FBSDKAppEventParameterDialogOutcome = @"fb_dialog_outcome"; NSString *const FBSDKAppEventParameterDialogOutcome = @"fb_dialog_outcome";
NSString *const FBSDKAppEventParameterDialogErrorMessage = @"fb_dialog_outcome_error_message"; NSString *const FBSDKAppEventParameterDialogErrorMessage = @"fb_dialog_outcome_error_message";
@ -174,13 +162,6 @@ NSString *const FBSDKAppEventParameterLogTime = @"_logTime";
NSString *const FBSDKAppEventParameterEventName = @"_eventName"; NSString *const FBSDKAppEventParameterEventName = @"_eventName";
NSString *const FBSDKAppEventParameterImplicitlyLogged = @"_implicitlyLogged"; NSString *const FBSDKAppEventParameterImplicitlyLogged = @"_implicitlyLogged";
NSString *const FBSDKAppEventParameterLiveStreamingPrevStatus = @"live_streaming_prev_status";
NSString *const FBSDKAppEventParameterLiveStreamingStatus = @"live_streaming_status";
NSString *const FBSDKAppEventParameterLiveStreamingError = @"live_streaming_error";
NSString *const FBSDKAppEventParameterLiveStreamingVideoID = @"live_streaming_video_id";
NSString *const FBSDKAppEventParameterLiveStreamingMicEnabled = @"live_streaming_mic_enabled";
NSString *const FBSDKAppEventParameterLiveStreamingCameraEnabled = @"live_streaming_camera_enabled";
// Event parameter values internal to this file // Event parameter values internal to this file
NSString *const FBSDKAppEventsDialogOutcomeValue_Completed = @"Completed"; NSString *const FBSDKAppEventsDialogOutcomeValue_Completed = @"Completed";
NSString *const FBSDKAppEventsDialogOutcomeValue_Cancelled = @"Cancelled"; NSString *const FBSDKAppEventsDialogOutcomeValue_Cancelled = @"Cancelled";
@ -239,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;
@ -266,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)
@ -306,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
@ -612,10 +594,6 @@ static NSString *g_overrideAppID = nil;
- (void)publishInstall - (void)publishInstall
{ {
NSString *appID = [self appID]; NSString *appID = [self appID];
if ([appID length] == 0) {
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors logEntry:@"Missing [FBSDKAppEvents appID] for [FBSDKAppEvents publishInstall:]"];
return;
}
NSString *lastAttributionPingString = [NSString stringWithFormat:@"com.facebook.sdk:lastAttributionPing%@", appID]; NSString *lastAttributionPingString = [NSString stringWithFormat:@"com.facebook.sdk:lastAttributionPing%@", appID];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults objectForKey:lastAttributionPingString]) { if ([defaults objectForKey:lastAttributionPingString]) {
@ -805,21 +783,15 @@ static NSString *g_overrideAppID = nil;
- (void)flushOnMainQueue:(FBSDKAppEventsState *)appEventsState - (void)flushOnMainQueue:(FBSDKAppEventsState *)appEventsState
forReason:(FBSDKAppEventsFlushReason)reason forReason:(FBSDKAppEventsFlushReason)reason
{ {
if (appEventsState.events.count == 0) { if (appEventsState.events.count == 0) {
return; return;
} }
if ([appEventsState.appID length] == 0) {
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors logEntry:@"Missing [FBSDKAppEvents appEventsState.appID] for [FBSDKAppEvents flushOnMainQueue:]"];
return;
}
[FBSDKAppEventsUtility ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass([self class])]; [FBSDKAppEventsUtility ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass([self class])];
[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"];
@ -834,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];
} }
@ -894,8 +866,7 @@ static NSString *g_overrideAppID = nil;
// We interpret a 400 coming back from FBRequestConnection as a server error due to improper data being // We interpret a 400 coming back from FBRequestConnection as a server error due to improper data being
// sent down. Otherwise we assume no connectivity, or another condition where we could treat it as no connectivity. // sent down. Otherwise we assume no connectivity, or another condition where we could treat it as no connectivity.
// Adding 404 as having wrong/missing appID results in 404 and that is not a connectivity issue flushResult = errorCode == 400 ? FlushResultServerError : FlushResultNoConnectivity;
flushResult = (errorCode == 400 || errorCode == 404) ? FlushResultServerError : FlushResultNoConnectivity;
} }
if (flushResult == FlushResultServerError) { if (flushResult == FlushResultServerError) {

View File

@ -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

View File

@ -44,5 +44,5 @@
#import <FBSDKCoreKit/FBSDKDeviceViewControllerBase.h> #import <FBSDKCoreKit/FBSDKDeviceViewControllerBase.h>
#endif #endif
#define FBSDK_VERSION_STRING @"4.33.0" #define FBSDK_VERSION_STRING @"4.29.0"
#define FBSDK_TARGET_PLATFORM_VERSION @"v3.0" #define FBSDK_TARGET_PLATFORM_VERSION @"v2.11"

View File

@ -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) {

View File

@ -60,26 +60,6 @@ static NSTimeInterval g_defaultTimeout = 60.0;
static FBSDKErrorConfiguration *g_errorConfiguration; static FBSDKErrorConfiguration *g_errorConfiguration;
#if !TARGET_OS_TV
static FBSDKAccessToken *_CreateExpiredAccessToken(FBSDKAccessToken *accessToken)
{
if (accessToken == nil) {
return nil;
}
if (accessToken.isExpired) {
return accessToken;
}
NSDate *expirationDate = [NSDate dateWithTimeIntervalSinceNow:-1];
return [[FBSDKAccessToken alloc] initWithTokenString:accessToken.tokenString
permissions:accessToken.permissions.allObjects
declinedPermissions:accessToken.declinedPermissions.allObjects
appID:accessToken.appID
userID:accessToken.userID
expirationDate:expirationDate
refreshDate:expirationDate];
}
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// FBSDKGraphRequestConnectionState // FBSDKGraphRequestConnectionState
@ -463,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];
@ -515,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;
} }
@ -679,7 +658,7 @@ NSURLSessionDataDelegate
error:(NSError **)error error:(NSError **)error
{ {
id parsed = nil; id parsed = nil;
if (!(*error) && [utf8 isKindOfClass:[NSString class]]) { if (!(*error)) {
parsed = [FBSDKInternalUtility objectForJSONString:utf8 error:error]; parsed = [FBSDKInternalUtility objectForJSONString:utf8 error:error];
// if we fail parse we attempt a re-parse of a modified input to support results in the form "foo=bar", "true", etc. // if we fail parse we attempt a re-parse of a modified input to support results in the form "foo=bar", "true", etc.
// which is shouldn't be necessary since Graph API v2.1. // which is shouldn't be necessary since Graph API v2.1.
@ -761,16 +740,10 @@ NSURLSessionDataDelegate
}; };
#if !TARGET_OS_TV #if !TARGET_OS_TV
void (^clearToken)(NSInteger) = ^(NSInteger errorSubcode){ void (^clearToken)(void) = ^{
if (metadata.request.flags & FBSDKGraphRequestFlagDoNotInvalidateTokenOnError) { if (!(metadata.request.flags & FBSDKGraphRequestFlagDoNotInvalidateTokenOnError)) {
return;
}
if (errorSubcode == 493) {
[FBSDKAccessToken setCurrentAccessToken:_CreateExpiredAccessToken([FBSDKAccessToken currentAccessToken])];
} else {
[FBSDKAccessToken setCurrentAccessToken:nil]; [FBSDKAccessToken setCurrentAccessToken:nil];
} }
}; };
FBSDKSystemAccountStoreAdapter *adapter = [FBSDKSystemAccountStoreAdapter sharedInstance]; FBSDKSystemAccountStoreAdapter *adapter = [FBSDKSystemAccountStoreAdapter sharedInstance];
@ -795,14 +768,14 @@ NSURLSessionDataDelegate
[adapter renewSystemAuthorization:^(ACAccountCredentialRenewResult result, NSError *renewError) { [adapter renewSystemAuthorization:^(ACAccountCredentialRenewResult result, NSError *renewError) {
NSOperationQueue *queue = _delegateQueue ?: [NSOperationQueue mainQueue]; NSOperationQueue *queue = _delegateQueue ?: [NSOperationQueue mainQueue];
[queue addOperationWithBlock:^{ [queue addOperationWithBlock:^{
clearToken(errorSubcode); clearToken();
finishAndInvokeCompletionHandler(); finishAndInvokeCompletionHandler();
}]; }];
}]; }];
return; return;
} }
} }
clearToken(errorSubcode); clearToken();
} else if (errorCode >= 200 && errorCode < 300) { } else if (errorCode >= 200 && errorCode < 300) {
// permission error // permission error
[adapter renewSystemAuthorization:^(ACAccountCredentialRenewResult result, NSError *renewError) { [adapter renewSystemAuthorization:^(ACAccountCredentialRenewResult result, NSError *renewError) {

View File

@ -19,7 +19,6 @@
#import "FBSDKSettings+Internal.h" #import "FBSDKSettings+Internal.h"
#import "FBSDKAccessTokenCache.h" #import "FBSDKAccessTokenCache.h"
#import "FBSDKAccessTokenExpirer.h"
#import "FBSDKCoreKit.h" #import "FBSDKCoreKit.h"
#define FBSDKSETTINGS_PLIST_CONFIGURATION_SETTING_IMPL(TYPE, PLIST_KEY, GETTER, SETTER, DEFAULT_VALUE) \ #define FBSDKSETTINGS_PLIST_CONFIGURATION_SETTING_IMPL(TYPE, PLIST_KEY, GETTER, SETTER, DEFAULT_VALUE) \
@ -53,7 +52,6 @@ static NSString *const FBSDKSettingsLimitEventAndDataUsage = @"com.facebook.sdk:
static BOOL g_disableErrorRecovery; static BOOL g_disableErrorRecovery;
static NSString *g_userAgentSuffix; static NSString *g_userAgentSuffix;
static NSString *g_defaultGraphAPIVersion; static NSString *g_defaultGraphAPIVersion;
static FBSDKAccessTokenExpirer *g_accessTokenExpirer;
@implementation FBSDKSettings @implementation FBSDKSettings
@ -61,7 +59,6 @@ static FBSDKAccessTokenExpirer *g_accessTokenExpirer;
{ {
if (self == [FBSDKSettings class]) { if (self == [FBSDKSettings class]) {
g_tokenCache = [[FBSDKAccessTokenCache alloc] init]; g_tokenCache = [[FBSDKAccessTokenCache alloc] init];
g_accessTokenExpirer = [[FBSDKAccessTokenExpirer alloc] init];
} }
} }

View File

@ -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

View File

@ -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();

View File

@ -94,17 +94,6 @@ FBSDK_EXTERN NSString *const FBSDKAppEventNameFBDialogsWebLoginCompleted;
/** Use to log the result of the App Switch OS AlertView. Only available on OS >= iOS10 */ /** Use to log the result of the App Switch OS AlertView. Only available on OS >= iOS10 */
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSessionFASLoginDialogResult; FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSessionFASLoginDialogResult;
/** Use to log the live streaming events from sdk */
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLiveStreamingStart;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLiveStreamingStop;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLiveStreamingPause;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLiveStreamingResume;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLiveStreamingError;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLiveStreamingUpdateStatus;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLiveStreamingVideoID;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLiveStreamingMic;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLiveStreamingCamera;
/** Use to log the results of a share dialog */ /** Use to log the results of a share dialog */
FBSDK_EXTERN NSString *const FBSDLAppEventNameFBSDKEventShareDialogResult; FBSDK_EXTERN NSString *const FBSDLAppEventNameFBSDKEventShareDialogResult;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKEventMessengerShareDialogResult; FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKEventMessengerShareDialogResult;
@ -123,14 +112,6 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterDialogShareContentPageID;
FBSDK_EXTERN NSString *const FBSDKAppEventParameterShareTrayActivityName; FBSDK_EXTERN NSString *const FBSDKAppEventParameterShareTrayActivityName;
FBSDK_EXTERN NSString *const FBSDKAppEventParameterShareTrayResult; FBSDK_EXTERN NSString *const FBSDKAppEventParameterShareTrayResult;
/*! Use to log parameters for live streaming*/
FBSDK_EXTERN NSString *const FBSDKAppEventParameterLiveStreamingPrevStatus;
FBSDK_EXTERN NSString *const FBSDKAppEventParameterLiveStreamingStatus;
FBSDK_EXTERN NSString *const FBSDKAppEventParameterLiveStreamingError;
FBSDK_EXTERN NSString *const FBSDKAppEventParameterLiveStreamingVideoID;
FBSDK_EXTERN NSString *const FBSDKAppEventParameterLiveStreamingMicEnabled;
FBSDK_EXTERN NSString *const FBSDKAppEventParameterLiveStreamingCameraEnabled;
// Internally known event parameter values // Internally known event parameter values
FBSDK_EXTERN NSString *const FBSDKAppEventsDialogOutcomeValue_Completed; FBSDK_EXTERN NSString *const FBSDKAppEventsDialogOutcomeValue_Completed;
@ -166,7 +147,6 @@ FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLikeButtonImpression;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLoginButtonImpression; FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLoginButtonImpression;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKSendButtonImpression; FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKSendButtonImpression;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKShareButtonImpression; FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKShareButtonImpression;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLiveStreamingButtonImpression;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKSmartLoginService; FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKSmartLoginService;
@ -174,7 +154,6 @@ FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLikeButtonDidTap;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLoginButtonDidTap; FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLoginButtonDidTap;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKSendButtonDidTap; FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKSendButtonDidTap;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKShareButtonDidTap; FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKShareButtonDidTap;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLiveStreamingButtonDidTap;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLikeControlDidDisable; FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLikeControlDidDisable;
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLikeControlDidLike; FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLikeControlDidLike;

View File

@ -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
} }
} }

View File

@ -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

View File

@ -42,6 +42,6 @@
dataAttachmentValue:(FBSDKGraphRequestDataAttachment *)dataAttachment dataAttachmentValue:(FBSDKGraphRequestDataAttachment *)dataAttachment
logger:(FBSDKLogger *)logger; logger:(FBSDKLogger *)logger;
- (NSString *)mimeContentType; + (NSString *)mimeContentType;
@end @end

View File

@ -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];
} }

View File

@ -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
@ -66,7 +65,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
smartLoginOptions:(FBSDKServerConfigurationSmartLoginOptions)smartLoginOptions smartLoginOptions:(FBSDKServerConfigurationSmartLoginOptions)smartLoginOptions
smartLoginBookmarkIconURL:(NSURL *)smartLoginBookmarkIconURL smartLoginBookmarkIconURL:(NSURL *)smartLoginBookmarkIconURL
smartLoginMenuIconURL:(NSURL *)smartLoginMenuIconURL smartLoginMenuIconURL:(NSURL *)smartLoginMenuIconURL
updateMessage:(NSString *)updateMessage
NS_DESIGNATED_INITIALIZER; NS_DESIGNATED_INITIALIZER;
@property (nonatomic, assign, readonly, getter=isAdvertisingIDEnabled) BOOL advertisingIDEnabled; @property (nonatomic, assign, readonly, getter=isAdvertisingIDEnabled) BOOL advertisingIDEnabled;
@ -77,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;
@ -88,7 +85,6 @@ NS_DESIGNATED_INITIALIZER;
@property (nonatomic, assign, readonly) FBSDKServerConfigurationSmartLoginOptions smartLoginOptions; @property (nonatomic, assign, readonly) FBSDKServerConfigurationSmartLoginOptions smartLoginOptions;
@property (nonatomic, copy, readonly) NSURL *smartLoginBookmarkIconURL; @property (nonatomic, copy, readonly) NSURL *smartLoginBookmarkIconURL;
@property (nonatomic, copy, readonly) NSURL *smartLoginMenuIconURL; @property (nonatomic, copy, readonly) NSURL *smartLoginMenuIconURL;
@property (nonatomic, copy, readonly) NSString *updateMessage;
@property (nonatomic, readonly) NSInteger version; @property (nonatomic, readonly) NSInteger version;
- (FBSDKDialogConfiguration *)dialogConfigurationForDialogName:(NSString *)dialogName; - (FBSDKDialogConfiguration *)dialogConfigurationForDialogName:(NSString *)dialogName;

View File

@ -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"
@ -42,7 +41,6 @@
#define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_KEY @"smartLoginEnabled" #define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_KEY @"smartLoginEnabled"
#define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_KEY @"smarstLoginBookmarkIconURL" #define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_KEY @"smarstLoginBookmarkIconURL"
#define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_KEY @"smarstLoginBookmarkMenuURL" #define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_KEY @"smarstLoginBookmarkMenuURL"
#define FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_KEY @"SDKUpdateMessage"
#define FBSDK_SERVER_CONFIGURATION_VERSION_KEY @"version" #define FBSDK_SERVER_CONFIGURATION_VERSION_KEY @"version"
#pragma mark - Dialog Names #pragma mark - Dialog Names
@ -89,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
@ -102,7 +99,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
smartLoginOptions:(FBSDKServerConfigurationSmartLoginOptions)smartLoginOptions smartLoginOptions:(FBSDKServerConfigurationSmartLoginOptions)smartLoginOptions
smartLoginBookmarkIconURL:(NSURL *)smartLoginBookmarkIconURL smartLoginBookmarkIconURL:(NSURL *)smartLoginBookmarkIconURL
smartLoginMenuIconURL:(NSURL *)smartLoginMenuIconURL smartLoginMenuIconURL:(NSURL *)smartLoginMenuIconURL
updateMessage:(NSString *)updateMessage
{ {
if ((self = [super init])) { if ((self = [super init])) {
_appID = [appID copy]; _appID = [appID copy];
@ -113,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];
@ -126,7 +121,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
_smartLoginOptions = smartLoginOptions; _smartLoginOptions = smartLoginOptions;
_smartLoginMenuIconURL = [smartLoginMenuIconURL copy]; _smartLoginMenuIconURL = [smartLoginMenuIconURL copy];
_smartLoginBookmarkIconURL = [smartLoginBookmarkIconURL copy]; _smartLoginBookmarkIconURL = [smartLoginBookmarkIconURL copy];
_updateMessage = [updateMessage copy];
_version = FBSDKServerConfigurationVersion; _version = FBSDKServerConfigurationVersion;
} }
return self; return self;
@ -183,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];
@ -208,7 +200,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
NSString *loggingToken = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_SERVER_CONFIGURATION_LOGGING_TOKEN]; NSString *loggingToken = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_SERVER_CONFIGURATION_LOGGING_TOKEN];
NSURL *smartLoginBookmarkIconURL = [decoder decodeObjectOfClass:[NSURL class] forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_KEY]; NSURL *smartLoginBookmarkIconURL = [decoder decodeObjectOfClass:[NSURL class] forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_KEY];
NSURL *smartLoginMenuIconURL = [decoder decodeObjectOfClass:[NSURL class] forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_KEY]; NSURL *smartLoginMenuIconURL = [decoder decodeObjectOfClass:[NSURL class] forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_KEY];
NSString *updateMessage = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_KEY];
NSInteger version = [decoder decodeIntegerForKey:FBSDK_SERVER_CONFIGURATION_VERSION_KEY]; NSInteger version = [decoder decodeIntegerForKey:FBSDK_SERVER_CONFIGURATION_VERSION_KEY];
FBSDKServerConfiguration *configuration = [self initWithAppID:appID FBSDKServerConfiguration *configuration = [self initWithAppID:appID
appName:appName appName:appName
@ -218,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
@ -231,7 +221,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
smartLoginOptions:smartLoginOptions smartLoginOptions:smartLoginOptions
smartLoginBookmarkIconURL:smartLoginBookmarkIconURL smartLoginBookmarkIconURL:smartLoginBookmarkIconURL
smartLoginMenuIconURL:smartLoginMenuIconURL smartLoginMenuIconURL:smartLoginMenuIconURL
updateMessage:updateMessage
]; ];
configuration->_version = version; configuration->_version = version;
return configuration; return configuration;
@ -249,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];
@ -261,7 +248,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
[encoder encodeInteger:_smartLoginOptions forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_KEY]; [encoder encodeInteger:_smartLoginOptions forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_KEY];
[encoder encodeObject:_smartLoginBookmarkIconURL forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_KEY]; [encoder encodeObject:_smartLoginBookmarkIconURL forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_KEY];
[encoder encodeObject:_smartLoginMenuIconURL forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_KEY]; [encoder encodeObject:_smartLoginMenuIconURL forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_KEY];
[encoder encodeObject:_updateMessage forKey:FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_KEY];
[encoder encodeInteger:_version forKey:FBSDK_SERVER_CONFIGURATION_VERSION_KEY]; [encoder encodeInteger:_version forKey:FBSDK_SERVER_CONFIGURATION_VERSION_KEY];
} }

View File

@ -50,7 +50,6 @@
#define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_FIELD @"seamless_login" #define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_FIELD @"seamless_login"
#define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_FIELD @"smart_login_bookmark_icon_url" #define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_FIELD @"smart_login_bookmark_icon_url"
#define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_FIELD @"smart_login_menu_icon_url" #define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_FIELD @"smart_login_menu_icon_url"
#define FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_FIELD @"sdk_update_message"
@implementation FBSDKServerConfigurationManager @implementation FBSDKServerConfigurationManager
@ -60,14 +59,12 @@ static FBSDKServerConfiguration *_serverConfiguration;
static NSError *_serverConfigurationError; static NSError *_serverConfigurationError;
static NSDate *_serverConfigurationErrorTimestamp; static NSDate *_serverConfigurationErrorTimestamp;
static const NSTimeInterval kTimeout = 4.0; static const NSTimeInterval kTimeout = 4.0;
static BOOL _printedUpdateMessage;
typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures) 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
@ -175,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]];
@ -193,7 +190,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
FBSDKServerConfigurationSmartLoginOptions smartLoginOptions = [FBSDKTypeUtility integerValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_FIELD]]; FBSDKServerConfigurationSmartLoginOptions smartLoginOptions = [FBSDKTypeUtility integerValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_FIELD]];
NSURL *smartLoginBookmarkIconURL = [FBSDKTypeUtility URLValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_FIELD]]; NSURL *smartLoginBookmarkIconURL = [FBSDKTypeUtility URLValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_FIELD]];
NSURL *smartLoginMenuIconURL = [FBSDKTypeUtility URLValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_FIELD]]; NSURL *smartLoginMenuIconURL = [FBSDKTypeUtility URLValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_FIELD]];
NSString *updateMessage = [FBSDKTypeUtility stringValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_FIELD]];
FBSDKServerConfiguration *serverConfiguration = [[FBSDKServerConfiguration alloc] initWithAppID:appID FBSDKServerConfiguration *serverConfiguration = [[FBSDKServerConfiguration alloc] initWithAppID:appID
appName:appName appName:appName
loginTooltipEnabled:loginTooltipEnabled loginTooltipEnabled:loginTooltipEnabled
@ -202,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
@ -215,7 +210,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
smartLoginOptions:smartLoginOptions smartLoginOptions:smartLoginOptions
smartLoginBookmarkIconURL:smartLoginBookmarkIconURL smartLoginBookmarkIconURL:smartLoginBookmarkIconURL
smartLoginMenuIconURL:smartLoginMenuIconURL smartLoginMenuIconURL:smartLoginMenuIconURL
updateMessage:updateMessage
]; ];
#if TARGET_OS_TV #if TARGET_OS_TV
// don't download icons more than once a day. // don't download icons more than once a day.
@ -258,9 +252,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_ENABLED_FIELD, FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_ENABLED_FIELD,
FBSDK_SERVER_CONFIGURATION_SESSION_TIMEOUT_FIELD, FBSDK_SERVER_CONFIGURATION_SESSION_TIMEOUT_FIELD,
FBSDK_SERVER_CONFIGURATION_LOGGIN_TOKEN_FIELD FBSDK_SERVER_CONFIGURATION_LOGGIN_TOKEN_FIELD
#ifdef DEBUG
,FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_FIELD
#endif
#if TARGET_OS_TV #if TARGET_OS_TV
,FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_FIELD, ,FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_FIELD,
FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_FIELD, FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_FIELD,
@ -307,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
@ -320,7 +310,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
smartLoginOptions:FBSDKServerConfigurationSmartLoginOptionsUnknown smartLoginOptions:FBSDKServerConfigurationSmartLoginOptionsUnknown
smartLoginBookmarkIconURL:nil smartLoginBookmarkIconURL:nil
smartLoginMenuIconURL:nil smartLoginMenuIconURL:nil
updateMessage:nil
]; ];
} }
return _defaultServerConfiguration; return _defaultServerConfiguration;
@ -350,14 +339,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
_serverConfiguration = serverConfiguration; _serverConfiguration = serverConfiguration;
_serverConfigurationError = nil; _serverConfigurationError = nil;
_serverConfigurationErrorTimestamp = nil; _serverConfigurationErrorTimestamp = nil;
#ifdef DEBUG
NSString *updateMessage = _serverConfiguration.updateMessage;
if (updateMessage && [updateMessage length] > 0 && !_printedUpdateMessage) {
_printedUpdateMessage = YES;
NSLog(@"%@", updateMessage);
}
#endif
} }
// update the cached copy in NSUserDefaults // update the cached copy in NSUserDefaults

View File

@ -1,23 +0,0 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import <Foundation/Foundation.h>
@interface FBSDKAccessTokenExpirer : NSObject
@end

View File

@ -1,71 +0,0 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import "FBSDKAccessTokenExpirer.h"
#import "FBSDKAccessToken.h"
#import "FBSDKApplicationDelegate+Internal.h"
#import "FBSDKInternalUtility.h"
@implementation FBSDKAccessTokenExpirer
{
NSTimer *_timer;
}
- (instancetype)init
{
if (self = [super init]) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_checkAccessTokenExpirationDate) name:FBSDKAccessTokenDidChangeNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_checkAccessTokenExpirationDate) name:FBSDKApplicationDidBecomeActiveNotification object:nil];
[self _checkAccessTokenExpirationDate];
}
return self;
}
- (void)dealloc
{
[_timer invalidate];
_timer = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)_checkAccessTokenExpirationDate
{
[_timer invalidate];
_timer = nil;
FBSDKAccessToken *accessToken = FBSDKAccessToken.currentAccessToken;
if (accessToken == nil || accessToken.isExpired) {
return;
}
_timer = [NSTimer scheduledTimerWithTimeInterval:[accessToken.expirationDate timeIntervalSinceNow] target:self selector:@selector(_timerDidFire) userInfo:nil repeats:NO];
}
- (void)_timerDidFire
{
FBSDKAccessToken *accessToken = FBSDKAccessToken.currentAccessToken;
NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
[FBSDKInternalUtility dictionary:userInfo setObject:accessToken forKey:FBSDKAccessTokenChangeNewKey];
[FBSDKInternalUtility dictionary:userInfo setObject:accessToken forKey:FBSDKAccessTokenChangeOldKey];
userInfo[FBSDKAccessTokenDidExpire] = @YES;
[[NSNotificationCenter defaultCenter] postNotificationName:FBSDKAccessTokenDidChangeNotification
object:[FBSDKAccessToken class]
userInfo:userInfo];
}
@end

View File

@ -1,62 +0,0 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/*!
@abstract Describes the initial response when starting the device login flow.
@discussion This is used by `FBSDKDeviceLoginManager`.
*/
@interface FBSDKDeviceLoginCodeInfo : NSObject
/*!
@abstract There is no public initializer.
*/
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
/*!
@abstract the unique id for this login flow.
*/
@property (nonatomic, copy, readonly) NSString *identifier;
/*!
@abstract the short "user_code" that should be presented to the user.
*/
@property (nonatomic, copy, readonly) NSString *loginCode;
/*!
@abstract the verification URL.
*/
@property (nonatomic, copy, readonly) NSURL *verificationURL;
/*!
@abstract the expiration date.
*/
@property (nonatomic, copy, readonly) NSDate *expirationDate;
/*!
@abstract the polling interval
*/
@property (nonatomic, assign, readonly) NSUInteger pollingInterval;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,38 +0,0 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import "FBSDKDeviceLoginCodeInfo+Internal.h"
@implementation FBSDKDeviceLoginCodeInfo
- (instancetype) initWithIdentifier:(NSString *)identifier
loginCode:(NSString *)loginCode
verificationURL:(NSURL *)verificationURL
expirationDate:(NSDate *)expirationDate
pollingInterval:(NSUInteger)pollingInterval
{
if ((self = [super init])) {
_identifier = [identifier copy];
_loginCode = [loginCode copy];
_verificationURL = [verificationURL copy];
_expirationDate = [expirationDate copy];
_pollingInterval = pollingInterval;
}
return self;
}
@end

View File

@ -1,105 +0,0 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import <Foundation/Foundation.h>
#import <FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.h>
#import <FBSDKLoginKit/FBSDKDeviceLoginManagerResult.h>
NS_ASSUME_NONNULL_BEGIN
@class FBSDKDeviceLoginManager;
/*!
@abstract A delegate for `FBSDKDeviceLoginManager`.
*/
@protocol FBSDKDeviceLoginManagerDelegate <NSObject>
/*!
@abstract Indicates the device login flow has started. You should parse `codeInfo` to
present the code to the user to enter.
@param loginManager the login manager instance.
@param codeInfo the code info data.
*/
- (void)deviceLoginManager:(FBSDKDeviceLoginManager *)loginManager startedWithCodeInfo:(FBSDKDeviceLoginCodeInfo *)codeInfo;
/*!
@abstract Indicates the device login flow has finished.
@param loginManager the login manager instance.
@param result the results of the login flow.
@param error the error, if available.
@discussion The flow can be finished if the user completed the flow, cancelled, or if the code has expired.
*/
- (void)deviceLoginManager:(FBSDKDeviceLoginManager *)loginManager
completedWithResult:(nullable FBSDKDeviceLoginManagerResult *)result
error:(nullable NSError *)error;
@end
/*!
@abstract Use this class to perform a device login flow.
@discussion The device login flow starts by requesting a code from the device login API.
This class informs the delegate when this code is received. You should then present the
code to the user to enter. In the meantime, this class polls the device login API
periodically and informs the delegate of the results.
See [Facebook Device Login](https://developers.facebook.com/docs/facebook-login/for-devices).
*/
@interface FBSDKDeviceLoginManager : NSObject <NSNetServiceDelegate>
/*!
@abstract Initializes a new instance.
@param permissions permissions to request.
*/
- (instancetype)initWithPermissions:(nullable NSArray<NSString *> *)permissions
enableSmartLogin:(BOOL)enableSmartLogin
NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
/*!
@abstract the delegate.
*/
@property (nonatomic, weak) id<FBSDKDeviceLoginManagerDelegate> delegate;
/*!
@abstract the requested permissions.
*/
@property (nullable, nonatomic, copy, readonly) NSArray<NSString *> *permissions;
/*!
@abstract the optional URL to redirect the user to after they complete the login.
@discussion the URL must be configured in your App Settings -> Advanced -> OAuth Redirect URIs
*/
@property (nullable, nonatomic, copy) NSURL *redirectURL;
/*!
@abstract Starts the device login flow
@discussion This instance will retain self until the flow is finished or cancelled.
*/
- (void)start;
/*!
@abstract Attempts to cancel the device login flow.
*/
- (void)cancel;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,232 +0,0 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import "FBSDKDeviceLoginManager.h"
#import "FBSDKDeviceLoginManagerResult+Internal.h"
#import <FBSDKCoreKit/FBSDKConstants.h>
#import "FBSDKCoreKit+Internal.h"
#import "FBSDKDeviceLoginCodeInfo+Internal.h"
#import "FBSDKDeviceLoginError.h"
#import "FBSDKLoginConstants.h"
static NSMutableArray<FBSDKDeviceLoginManager *> *g_loginManagerInstances;
@implementation FBSDKDeviceLoginManager {
FBSDKDeviceLoginCodeInfo *_codeInfo;
BOOL _isCancelled;
NSNetService * _loginAdvertisementService;
BOOL _isSmartLoginEnabled;
}
+ (void)initialize
{
if (self == [FBSDKDeviceLoginManager class]) {
g_loginManagerInstances = [NSMutableArray array];
}
}
- (instancetype)initWithPermissions:(NSArray<NSString *> *)permissions enableSmartLogin:(BOOL)enableSmartLogin
{
if ((self = [super init])) {
_permissions = [permissions copy];
_isSmartLoginEnabled = enableSmartLogin;
}
return self;
}
- (void)start
{
[FBSDKInternalUtility validateAppID];
[g_loginManagerInstances addObject:self];
NSDictionary *parameters = @{
@"scope": [self.permissions componentsJoinedByString:@","] ?: @"",
@"redirect_uri": self.redirectURL.absoluteString ?: @"",
FBSDK_DEVICE_INFO_PARAM: [FBSDKDeviceRequestsHelper getDeviceInfo],
};
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"device/login"
parameters:parameters
tokenString:[FBSDKInternalUtility validateRequiredClientAccessToken]
HTTPMethod:@"POST"
flags:FBSDKGraphRequestFlagNone];
[request setGraphErrorRecoveryDisabled:YES];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
if (error) {
[self _processError:error];
return;
}
_codeInfo = [[FBSDKDeviceLoginCodeInfo alloc]
initWithIdentifier:result[@"code"]
loginCode:result[@"user_code"]
verificationURL:[NSURL URLWithString:result[@"verification_uri"]]
expirationDate:[[NSDate date] dateByAddingTimeInterval:[result[@"expires_in"] doubleValue]]
pollingInterval:[result[@"interval"] integerValue]];
if (_isSmartLoginEnabled) {
[FBSDKDeviceRequestsHelper startAdvertisementService:_codeInfo.loginCode
withDelegate:self
];
}
[self.delegate deviceLoginManager:self startedWithCodeInfo:_codeInfo];
[self _schedulePoll:_codeInfo.pollingInterval];
}];
}
- (void)cancel
{
[FBSDKDeviceRequestsHelper cleanUpAdvertisementService:self];
_isCancelled = YES;
[g_loginManagerInstances removeObject:self];
}
#pragma mark - Private impl
- (void)_notifyError:(NSError *)error
{
[FBSDKDeviceRequestsHelper cleanUpAdvertisementService:self];
[self.delegate deviceLoginManager:self
completedWithResult:nil
error:error];
[g_loginManagerInstances removeObject:self];
}
- (void)_notifyToken:(NSString *)tokenString
{
[FBSDKDeviceRequestsHelper cleanUpAdvertisementService:self];
void(^completeWithResult)(FBSDKDeviceLoginManagerResult *) = ^(FBSDKDeviceLoginManagerResult *result) {
[self.delegate deviceLoginManager:self completedWithResult:result error:nil];
[g_loginManagerInstances removeObject:self];
};
if (tokenString) {
FBSDKGraphRequest *permissionsRequest =
[[FBSDKGraphRequest alloc] initWithGraphPath:@"me"
parameters:@{@"fields": @"id,permissions"}
tokenString:tokenString
HTTPMethod:@"GET"
flags:FBSDKGraphRequestFlagDisableErrorRecovery];
[permissionsRequest startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id permissionRawResult, NSError *error) {
NSString *userID = permissionRawResult[@"id"];
NSDictionary *permissionResult = permissionRawResult[@"permissions"];
if (error ||
!userID ||
!permissionResult) {
#if TARGET_TV_OS
NSError *wrappedError = [FBSDKTVOSError errorWithCode:FBSDKTVOSUnknownErrorCode
message:@"Unable to fetch permissions for token"
underlyingError:error];
#else
NSError *wrappedError = [FBSDKDeviceLoginError errorWithCode:FBSDKUnknownErrorCode
message:@"Unable to fetch permissions for token"
underlyingError:error];
#endif
[self _notifyError:wrappedError];
} else {
NSMutableSet<NSString *> *permissions = [NSMutableSet set];
NSMutableSet<NSString *> *declinedPermissions = [NSMutableSet set];
[FBSDKInternalUtility extractPermissionsFromResponse:permissionResult
grantedPermissions:permissions
declinedPermissions:declinedPermissions];
FBSDKAccessToken *accessToken = [[FBSDKAccessToken alloc] initWithTokenString:tokenString
permissions:permissions.allObjects
declinedPermissions:declinedPermissions.allObjects
appID:[FBSDKSettings appID]
userID:userID
expirationDate:nil
refreshDate:nil];
FBSDKDeviceLoginManagerResult *result = [[FBSDKDeviceLoginManagerResult alloc] initWithToken:accessToken
isCancelled:NO];
completeWithResult(result);
}
}];
} else {
_isCancelled = YES;
FBSDKDeviceLoginManagerResult *result = [[FBSDKDeviceLoginManagerResult alloc] initWithToken:nil isCancelled:YES];
completeWithResult(result);
}
}
- (void)_processError:(NSError *)error
{
FBSDKDeviceLoginErrorSubcode code = [error.userInfo[FBSDKGraphRequestErrorGraphErrorSubcode] unsignedIntegerValue];
switch (code) {
case FBSDKDeviceLoginAuthorizationPendingErrorSubcode:
[self _schedulePoll:_codeInfo.pollingInterval];
break;
case FBSDKDeviceLoginCodeExpiredErrorSubcode:
case FBSDKDeviceLoginAuthorizationDeclinedErrorSubcode:
[self _notifyToken:nil];
break;
case FBSDKDeviceLoginExcessivePollingErrorSubcode:
[self _schedulePoll:_codeInfo.pollingInterval * 2];
default:
[self _notifyError:error];
break;
}
}
- (void)_schedulePoll:(NSUInteger)interval
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(interval * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (_isCancelled) {
return;
}
NSDictionary *parameters = @{ @"code": _codeInfo.identifier };
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"device/login_status"
parameters:parameters
tokenString:[FBSDKInternalUtility validateRequiredClientAccessToken]
HTTPMethod:@"POST"
flags:FBSDKGraphRequestFlagNone];
[request setGraphErrorRecoveryDisabled:YES];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
if (_isCancelled) {
return;
}
if (error) {
[self _processError:error];
} else {
NSString *tokenString = result[@"access_token"];
if (tokenString) {
[self _notifyToken:tokenString];
} else {
NSError *unknownError = [FBSDKDeviceLoginError errorWithCode:FBSDKUnknownErrorCode
message:@"Device Login poll failed. No token nor error was found."];
[self _notifyError:unknownError];
}
}
}];
});
}
- (void)netService:(NSNetService *)sender
didNotPublish:(NSDictionary<NSString *, NSNumber *> *)errorDict
{
// Only cleanup if the publish error is from our advertising service
if ([FBSDKDeviceRequestsHelper isDelegate:self forAdvertisementService:sender])
{
[FBSDKDeviceRequestsHelper cleanUpAdvertisementService:self];
}
}
@end

View File

@ -1,50 +0,0 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import <Foundation/Foundation.h>
#import <FBSDKCoreKit/FBSDKAccessToken.h>
NS_ASSUME_NONNULL_BEGIN
/*!
@abstract Represents the results of the a device login flow.
@discussion This is used by `FBSDKDeviceLoginManager`.
*/
@interface FBSDKDeviceLoginManagerResult : NSObject
/*!
@abstract There is no public initializer.
*/
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
/*!
@abstract The token.
*/
@property (nullable, nonatomic, strong, readonly) FBSDKAccessToken *accessToken;
/*!
@abstract Indicates if the login was cancelled by the user, or if the device
login code has expired.
*/
@property (nonatomic, assign, readonly, getter=isCancelled) BOOL cancelled;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,33 +0,0 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import "FBSDKDeviceLoginManagerResult+Internal.h"
@implementation FBSDKDeviceLoginManagerResult
- (instancetype)initWithToken:(FBSDKAccessToken *)token
isCancelled:(BOOL)cancelled
{
if ((self = [super init])) {
_accessToken = token;
_cancelled = cancelled;
}
return self;
}
@end

View File

@ -211,7 +211,7 @@ static const CGFloat kPaddingBetweenLogoTitle = 8.0;
- (void)_accessTokenDidChangeNotification:(NSNotification *)notification - (void)_accessTokenDidChangeNotification:(NSNotification *)notification
{ {
if (notification.userInfo[FBSDKAccessTokenDidChangeUserID] || notification.userInfo[FBSDKAccessTokenDidExpire]) { if (notification.userInfo[FBSDKAccessTokenDidChangeUserID]) {
[self _updateContent]; [self _updateContent];
} }
} }
@ -219,7 +219,7 @@ static const CGFloat kPaddingBetweenLogoTitle = 8.0;
- (void)_buttonPressed:(id)sender - (void)_buttonPressed:(id)sender
{ {
[self logTapEventWithEventName:FBSDKAppEventNameFBSDKLoginButtonDidTap parameters:[self analyticsParameters]]; [self logTapEventWithEventName:FBSDKAppEventNameFBSDKLoginButtonDidTap parameters:[self analyticsParameters]];
if ([FBSDKAccessToken currentAccessTokenIsActive]) { if ([FBSDKAccessToken currentAccessToken]) {
NSString *title = nil; NSString *title = nil;
if (_userName) { if (_userName) {
@ -338,9 +338,8 @@ static const CGFloat kPaddingBetweenLogoTitle = 8.0;
- (void)_updateContent - (void)_updateContent
{ {
BOOL accessTokenIsValid = [FBSDKAccessToken currentAccessTokenIsActive]; self.selected = ([FBSDKAccessToken currentAccessToken] != nil);
self.selected = accessTokenIsValid; if ([FBSDKAccessToken currentAccessToken]) {
if (accessTokenIsValid) {
if (![[FBSDKAccessToken currentAccessToken].userID isEqualToString:_userID]) { if (![[FBSDKAccessToken currentAccessToken].userID isEqualToString:_userID]) {
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me?fields=id,name" FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me?fields=id,name"
parameters:nil parameters:nil

View File

@ -74,26 +74,3 @@ typedef NS_ENUM(NSInteger, FBSDKLoginErrorCode)
*/ */
FBSDKLoginBadChallengeString, FBSDKLoginBadChallengeString,
}; };
/**
NS_ENUM(NSInteger, FBSDKDeviceLoginErrorCode)
Error codes for FBSDKDeviceLoginErrorDomain.
*/
typedef NS_ENUM(NSUInteger, FBSDKDeviceLoginErrorSubcode) {
/**
Your device is polling too frequently.
*/
FBSDKDeviceLoginExcessivePollingErrorSubcode = 1349172,
/**
User has declined to authorize your application.
*/
FBSDKDeviceLoginAuthorizationDeclinedErrorSubcode = 1349173,
/**
User has not yet authorized your application. Continue polling.
*/
FBSDKDeviceLoginAuthorizationPendingErrorSubcode = 1349174,
/**
The code you entered has expired.
*/
FBSDKDeviceLoginCodeExpiredErrorSubcode = 1349152
};

View File

@ -18,18 +18,8 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#if !TARGET_TV_OS
#import <FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.h>
#import <FBSDKLoginKit/FBSDKDeviceLoginManager.h>
#import <FBSDKLoginKit/FBSDKDeviceLoginManagerResult.h>
#import <FBSDKLoginKit/FBSDKLoginButton.h> #import <FBSDKLoginKit/FBSDKLoginButton.h>
#import <FBSDKLoginKit/FBSDKLoginConstants.h> #import <FBSDKLoginKit/FBSDKLoginConstants.h>
#import <FBSDKLoginKit/FBSDKLoginManager.h> #import <FBSDKLoginKit/FBSDKLoginManager.h>
#import <FBSDKLoginKit/FBSDKLoginManagerLoginResult.h> #import <FBSDKLoginKit/FBSDKLoginManagerLoginResult.h>
#import <FBSDKLoginKit/FBSDKLoginTooltipView.h> #import <FBSDKLoginKit/FBSDKLoginTooltipView.h>
#else
#import <FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.h>
#import <FBSDKLoginKit/FBSDKDeviceLoginManager.h>
#import <FBSDKLoginKit/FBSDKDeviceLoginManagerResult.h>
#import <FBSDKLoginKit/FBSDKLoginConstants.h>
#endif

View File

@ -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

View File

@ -1,43 +0,0 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import <Foundation/Foundation.h>
#import "FBSDKDeviceLoginCodeInfo.h"
NS_ASSUME_NONNULL_BEGIN
@interface FBSDKDeviceLoginCodeInfo ()
/*!
@abstract Initializes a new instance
@param identifier the unique id for this login flow instance.
@param loginCode the short "user_code".
@param verificationURL the verification URL.
@param expirationDate expiration date.
@param pollingInterval time between polling.
*/
- (instancetype)initWithIdentifier:(NSString *)identifier
loginCode:(NSString *)loginCode
verificationURL:(NSURL *)verificationURL
expirationDate:(NSDate *)expirationDate
pollingInterval:(NSUInteger)pollingInterval NS_DESIGNATED_INITIALIZER;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,29 +0,0 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import <Foundation/Foundation.h>
#import "FBSDKCoreKit+Internal.h"
NS_ASSUME_NONNULL_BEGIN
@interface FBSDKDeviceLoginError : FBSDKError
@end
NS_ASSUME_NONNULL_END

View File

@ -1,30 +0,0 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import "FBSDKDeviceLoginError.h"
#import "FBSDKLoginConstants.h"
@implementation FBSDKDeviceLoginError
+ (NSString *)errorDomain
{
return FBSDKLoginErrorDomain;
}
@end

View File

@ -1,39 +0,0 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import <Foundation/Foundation.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import "FBSDKDeviceLoginManagerResult.h"
NS_ASSUME_NONNULL_BEGIN
@interface FBSDKDeviceLoginManagerResult ()
/*!
@abstract Initializes a new instance
@param token The token
@param cancelled Indicates if the flow was cancelled.
*/
- (instancetype)initWithToken:(nullable FBSDKAccessToken *)token
isCancelled:(BOOL)cancelled NS_DESIGNATED_INITIALIZER;
@end
NS_ASSUME_NONNULL_END

View File

@ -21,32 +21,12 @@
#import <FBSDKShareKit/FBSDKSharing.h> #import <FBSDKShareKit/FBSDKSharing.h>
/** /**
A dialog for sharing content through Messenger. A dialog for sharing content through Messenger.
DEPRECATION WARNING: AS OF THE JULY 2018 RELEASE, FBSDKMessageDialog WILL STOP SUPPORTING
SOME OF THE EXISTING FBSDKSharingContent TYPES. validateWithError WILL RETURN NO WITH AN
ERROR FOR UNSUPPORTED TYPES, AND TRYING TO show UNSUPPOTED CONTENT WILL CALL
sharer: didFailWithError: ON THE DELEGATE. THE FOLLOWING SHARE TYPES WILL CONTINUE TO BE
SUPPORTED ON AND AFTER JULY 2018:
- FBSDKShareLinkContent
- FBSDKShareMessengerOpenGraphMusicTemplateContent
- FBSDKShareMessengerMediaTemplateContent
- FBSDKShareMessengerGenericTemplateContent
THE FOLLOWING WILL NO LONGER BE SUPPORTED AS OF JULY 2018:
- FBSDKShareOpenGraphContent
- FBSDKSharePhotoContent
- FBSDKShareVideoContent
- Any other types that are not one of the four supported types listed above
FBSDKShareMessengerMediaTemplateContent and FBSDKShareMessengerGenericTemplateContent
SHOULD BE ABLE TO REPLACE THE FUNCTIONALITY OF FBSDKSharePhotoContent AND
FBSDKShareVideoContent, SO CONSIDER MIGRATING TO THESE NEW SHARE TYPES.
*/ */
@interface FBSDKMessageDialog : NSObject <FBSDKSharingDialog> @interface FBSDKMessageDialog : NSObject <FBSDKSharingDialog>
/** /**
Convenience method to show a Message Share Dialog with content and a delegate. Convenience method to show a Message Share Dialog with content and a delegate.
- Parameter content: The content to be shared. - Parameter content: The content to be shared.
- Parameter delegate: The receiver's delegate. - Parameter delegate: The receiver's delegate.
*/ */

View File

@ -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);

View File

@ -1 +0,0 @@
../../../FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenExpirer.h

View File

@ -1 +0,0 @@
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginCodeInfo+Internal.h

View File

@ -1 +0,0 @@
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.h

View File

@ -1 +0,0 @@
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginError.h

View File

@ -1 +0,0 @@
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.h

View File

@ -1 +0,0 @@
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginManagerResult+Internal.h

View File

@ -1 +0,0 @@
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManagerResult.h

View File

@ -1 +0,0 @@
../../../../../PNObject/Classes/PNObject+PNObjectDELETEConnection.h

View File

@ -1 +0,0 @@
../../../../../PNObject/Classes/PNObject+PNObjectGETConnection.h

View File

@ -1 +0,0 @@
../../../../../PNObject/Classes/PNObject+PNObjectPOSTConnection.h

View File

@ -1 +0,0 @@
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.h

View File

@ -1 +0,0 @@
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.h

View File

@ -1 +0,0 @@
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManagerResult.h

View File

@ -1 +0,0 @@
../../../../../PNObject/Classes/PNObject+PNObjectDELETEConnection.h

View File

@ -1 +0,0 @@
../../../../../PNObject/Classes/PNObject+PNObjectGETConnection.h

View File

@ -1 +0,0 @@
../../../../../PNObject/Classes/PNObject+PNObjectPOSTConnection.h

View File

@ -1,6 +1,6 @@
{ {
"name": "PNObject", "name": "PNObject",
"version": "2.5.7", "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.5.7" "tag": "1.3.4"
}, },
"platforms": { "platforms": {
"ios": "8.0" "ios": "8.0"

View File

@ -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.33.0): - FBSDKCoreKit (4.29.0):
- Bolts (~> 1.7) - Bolts (~> 1.7)
- FBSDKLoginKit (4.33.0): - FBSDKLoginKit (4.29.0):
- FBSDKCoreKit
- FBSDKShareKit (4.29.0):
- FBSDKCoreKit - FBSDKCoreKit
- FBSDKShareKit (4.33.0):
- FBSDKCoreKit (~> 4.33.0)
- NSDataAES (0.2.2) - NSDataAES (0.2.2)
- NSDate_Utils (1.1.0): - NSDate_Utils (1.1.0):
- DJLocalization - DJLocalization
- NSString-Helper (1.1.0) - 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.5.7): - 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.8) - UIDevice-Utils (1.0.0)
DEPENDENCIES: DEPENDENCIES:
- Expecta - Expecta
@ -66,54 +66,32 @@ DEPENDENCIES:
- PureLayout - PureLayout
- Specta - Specta
SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- AFNetworking
- Bolts
- CodFis-Helper
- DDDKeychainWrapper
- DJLocalization
- Expecta
- FBSDKCoreKit
- FBSDKLoginKit
- FBSDKShareKit
- NSDataAES
- NSDate_Utils
- NSString-Helper
- nv-ios-http-status
- PEAR-FileManager-iOS
- PureLayout
- RZDataBinding
- Specta
- StrongestPasswordValidator
- UIDevice-Utils
EXTERNAL SOURCES: EXTERNAL SOURCES:
PNObject: PNObject:
: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: 572b047a7e029bc44542bcf8a59414e7ff2b543e FBSDKCoreKit: 6f139173dc63a1deaff4430a55f2fe5bb222d2af
FBSDKLoginKit: 88cb456349cfb3b554427ce4f8b43729d85dfb40 FBSDKLoginKit: 56a057ca6822535ea0faa25f57a7c41edb697fd4
FBSDKShareKit: b7b5002833a4104fbecad75e8e4e082e91c7a08a FBSDKShareKit: 18a2cd118aef11dd657fe7e8b64bae5c719088b2
NSDataAES: 967ea3337476a80e9838a533c25d570a06855ed0 NSDataAES: 967ea3337476a80e9838a533c25d570a06855ed0
NSDate_Utils: c858a89da6e204ecf53aca48dbccb4da4d25bc9e NSDate_Utils: c858a89da6e204ecf53aca48dbccb4da4d25bc9e
NSString-Helper: 645162758421206f509cb46cbd10023eab7594ed NSString-Helper: 459e1b6a62b3bf7db10f01b0d102548608e945c4
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3 PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
PNObject: 524a8d655fb150c0da2f262441bbbe24dd9bd8b9 PNObject: 8dc560680a7a48060ed309b019ca4fc41505cc07
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109 RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7 StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
UIDevice-Utils: a629b53a88c1429cfb4bdff35b18287feebd164a UIDevice-Utils: ff37bd042127117572d6ce4c5ff074f4f54ab5ed
PODFILE CHECKSUM: eec9c921f7aee591fd1fdea1fd3e5a191b74a436 PODFILE CHECKSUM: fcd5d1cf3426c7c9c5b3e5edcd4b8e5402ee7f2e
COCOAPODS: 1.5.0 COCOAPODS: 1.3.1

View File

@ -22,8 +22,6 @@
- (BOOL) isValidTaxCode; - (BOOL) isValidTaxCode;
- (BOOL) isValidFirstnameOrLastname;
- (NSString *) md5; - (NSString *) md5;
- (NSString*) sha1; - (NSString*) sha1;
@ -32,5 +30,4 @@
- (NSString*) sha512; - (NSString*) sha512;
@end @end

View File

@ -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 {
@ -62,15 +59,6 @@
return [urlTest evaluateWithObject:self]; return [urlTest evaluateWithObject:self];
} }
- (BOOL) isValidFirstnameOrLastname {
NSString *firstNameRegEx = @"^[a-zA-Z][ a-zA-Z\\s]+$";
NSPredicate *nameTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", firstNameRegEx];
return [nameTest evaluateWithObject:self];
}
#pragma mark - Random String Method #pragma mark - Random String Method
+ (NSString *) getRandString: (int) length { + (NSString *) getRandString: (int) length {

File diff suppressed because it is too large Load Diff

View File

@ -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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 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}

View File

@ -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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Bolts" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Bolts" 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}

View File

@ -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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/CodFis-Helper" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CodFis-Helper" 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}

View File

@ -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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" 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}

View File

@ -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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/DJLocalization" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DJLocalization" 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}

View File

@ -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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Expecta" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" 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}

View File

@ -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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" 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}

View File

@ -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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" 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}

View File

@ -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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FBSDKShareKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" 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}

View File

@ -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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/NSDataAES" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/NSDataAES" 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}

View File

@ -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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/NSDate_Utils" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/NSDate_Utils" 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}

View File

@ -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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/NSString-Helper" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/NSString-Helper" 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}

View File

@ -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 = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" 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}

View File

@ -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 = $(inherited) "${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/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/RZDataBinding" "${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}

View File

@ -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) 20112016 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

Some files were not shown because too many files have changed in this diff Show More