Compare commits
No commits in common. "2.5.7" and "master" have entirely different histories.
@ -39,7 +39,7 @@
|
||||
/* Begin PBXFileReference section */
|
||||
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>"; };
|
||||
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>"; };
|
||||
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; };
|
||||
@ -210,6 +210,7 @@
|
||||
6003F586195388D20070C39A /* Sources */,
|
||||
6003F587195388D20070C39A /* Frameworks */,
|
||||
6003F588195388D20070C39A /* Resources */,
|
||||
C40CC8D7B1996A567BE82827 /* [CP] Embed Pods Frameworks */,
|
||||
614EA73ED5E0ED0F8684468C /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
@ -229,6 +230,8 @@
|
||||
6003F5AA195388D20070C39A /* Sources */,
|
||||
6003F5AB195388D20070C39A /* Frameworks */,
|
||||
6003F5AC195388D20070C39A /* Resources */,
|
||||
746A765B48FD98342716D81F /* [CP] Embed Pods Frameworks */,
|
||||
21411FBE0FE21EC75B6AB1E3 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@ -304,6 +307,21 @@
|
||||
/* End PBXResourcesBuildPhase 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 */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@ -333,13 +351,43 @@
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FacebookSDKStrings.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example-resources.sh\"\n";
|
||||
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 */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
||||
@ -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>
|
||||
@ -25,6 +25,7 @@
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
|
||||
[FBSDKSettings setAppID:@"213761522305123"];
|
||||
|
||||
[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
|
||||
@ -33,23 +34,21 @@
|
||||
// Override point for customization after application launch.
|
||||
|
||||
[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/"},
|
||||
} andUserSubclass:[PNUser class]];
|
||||
} userSubclass:[PNUser class] withOauthMode:OAuthModeClientCredential];
|
||||
|
||||
/** Can user special char %@ to autoset EndpointPath to Oauth endpointPath */
|
||||
[[PNObjectConfig sharedInstance] setClientID:@"******" clientSecret:@"******" oAuthEndpointAction:@"%@oauth-token" oauthMode:OAuthModeClientCredential refreshTokenEnabled:NO forEnv:EnvironmentStage];
|
||||
[[PNObjectConfig sharedInstance] setClientID:@"******" clientSecret:@"******" oAuthEndpointAction:@"%@oauth-token" oauthMode:OAuthModePassword refreshTokenEnabled:NO forEnv:EnvironmentStage];
|
||||
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentStage];
|
||||
[[PNObjectConfig sharedInstance] setClientID:@"xxxxxxxxx" clientSecret:@"xxxxxxxxxxxx" forEnv:EnvironmentProduction];
|
||||
|
||||
[[PNObjectConfig sharedInstance] setOauthUserName:@"admin" oauthPassword:@"admin" forEnv:EnvironmentStage];
|
||||
|
||||
[[PNObjectConfig sharedInstance] setEnvironment:EnvironmentStage];
|
||||
//[[PNObjectConfig sharedInstance] setHTTPHeaderValue:@"XMLHttpRequest" forKey:@"X-Request-With"];
|
||||
|
||||
NSLogDebug(@"%@",[[PNObjectConfig sharedInstance] baseUrl]);
|
||||
NSLogDebug(@"%@",[[PNObjectConfig sharedInstance] endPointPath]);
|
||||
NSLogDebug(@"%@",[[PNObjectConfig sharedInstance] endPointUrl]);
|
||||
|
||||
[[PNObjectConfig sharedInstance] loadManagersWithCredentials];
|
||||
|
||||
|
||||
PNObjViewController *viewController = [[PNObjViewController alloc] init];
|
||||
|
||||
|
||||
@ -93,21 +93,11 @@
|
||||
}
|
||||
|
||||
- (void) refreshTokenAction {
|
||||
[[PNObjectConfig sharedInstance] refreshTokenForClientCredentialWithBlockSuccess:^(BOOL refreshSuccess) {
|
||||
|
||||
[PNUser loginCurrentUserWithUsername:@"test" password:@"test" withBlockSuccess:^(PNUser * _Nullable responseObject) {
|
||||
|
||||
NSLog(@"success");
|
||||
} failure:^(NSError * _Nonnull error) {
|
||||
NSLog(@"%@",error);
|
||||
}];
|
||||
} failure:^(NSError * _Nonnull error) {
|
||||
|
||||
}];
|
||||
[[PNObjectConfig sharedInstance] refreshTokenForClientCredential];
|
||||
}
|
||||
|
||||
- (void) cancelTokenAction {
|
||||
[[PNObjectConfig sharedInstance] resetAllTokens];
|
||||
[[PNObjectConfig sharedInstance] resetToken];
|
||||
}
|
||||
|
||||
- (void) apiCallAction {
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
platform :ios, '9.0'
|
||||
|
||||
target 'PNObject_Example' do
|
||||
pod 'PNObject', :path => '../'
|
||||
pod 'PureLayout'
|
||||
pod 'PNObject', :path => '../'
|
||||
pod 'PureLayout'
|
||||
|
||||
target 'PNObject_Tests' do
|
||||
target 'PNObject_Tests' do
|
||||
inherit! :search_paths
|
||||
|
||||
pod 'Specta'
|
||||
pod 'Expecta'
|
||||
pod 'Expecta'
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
PODS:
|
||||
- AFNetworking (3.2.0):
|
||||
- AFNetworking/NSURLSession (= 3.2.0)
|
||||
- AFNetworking/Reachability (= 3.2.0)
|
||||
- AFNetworking/Security (= 3.2.0)
|
||||
- AFNetworking/Serialization (= 3.2.0)
|
||||
- AFNetworking/UIKit (= 3.2.0)
|
||||
- AFNetworking/NSURLSession (3.2.0):
|
||||
- AFNetworking (3.1.0):
|
||||
- AFNetworking/NSURLSession (= 3.1.0)
|
||||
- AFNetworking/Reachability (= 3.1.0)
|
||||
- AFNetworking/Security (= 3.1.0)
|
||||
- AFNetworking/Serialization (= 3.1.0)
|
||||
- AFNetworking/UIKit (= 3.1.0)
|
||||
- AFNetworking/NSURLSession (3.1.0):
|
||||
- AFNetworking/Reachability
|
||||
- AFNetworking/Security
|
||||
- AFNetworking/Serialization
|
||||
- AFNetworking/Reachability (3.2.0)
|
||||
- AFNetworking/Security (3.2.0)
|
||||
- AFNetworking/Serialization (3.2.0)
|
||||
- AFNetworking/UIKit (3.2.0):
|
||||
- AFNetworking/Reachability (3.1.0)
|
||||
- AFNetworking/Security (3.1.0)
|
||||
- AFNetworking/Serialization (3.1.0)
|
||||
- AFNetworking/UIKit (3.1.0):
|
||||
- AFNetworking/NSURLSession
|
||||
- Bolts (1.9.0):
|
||||
- Bolts/AppLinks (= 1.9.0)
|
||||
@ -26,19 +26,19 @@ PODS:
|
||||
- DJLocalization/Core (= 1.2.2)
|
||||
- DJLocalization/Core (1.2.2)
|
||||
- Expecta (1.0.6)
|
||||
- FBSDKCoreKit (4.33.0):
|
||||
- FBSDKCoreKit (4.29.0):
|
||||
- Bolts (~> 1.7)
|
||||
- FBSDKLoginKit (4.33.0):
|
||||
- FBSDKLoginKit (4.29.0):
|
||||
- FBSDKCoreKit
|
||||
- FBSDKShareKit (4.29.0):
|
||||
- FBSDKCoreKit
|
||||
- FBSDKShareKit (4.33.0):
|
||||
- FBSDKCoreKit (~> 4.33.0)
|
||||
- NSDataAES (0.2.2)
|
||||
- NSDate_Utils (1.1.0):
|
||||
- DJLocalization
|
||||
- NSString-Helper (1.1.0)
|
||||
- NSString-Helper (1.0.5)
|
||||
- nv-ios-http-status (0.0.1)
|
||||
- PEAR-FileManager-iOS (1.3.1)
|
||||
- PNObject (2.5.7):
|
||||
- PNObject (1.3.4):
|
||||
- AFNetworking
|
||||
- CodFis-Helper
|
||||
- DDDKeychainWrapper
|
||||
@ -58,7 +58,7 @@ PODS:
|
||||
- RZDataBinding (2.1.0)
|
||||
- Specta (1.0.7)
|
||||
- StrongestPasswordValidator (0.1.2)
|
||||
- UIDevice-Utils (1.0.8)
|
||||
- UIDevice-Utils (1.0.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Expecta
|
||||
@ -66,54 +66,32 @@ DEPENDENCIES:
|
||||
- PureLayout
|
||||
- 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:
|
||||
PNObject:
|
||||
:path: "../"
|
||||
:path: ../
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
AFNetworking: 8ac6017b94ea105479f7776e5288e48ae9c59bb4
|
||||
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
|
||||
Bolts: ac6567323eac61e203f6a9763667d0f711be34c8
|
||||
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
||||
DDDKeychainWrapper: e681a4daba6448786fa83b4941f58102a33b1897
|
||||
DJLocalization: 0c84029af375647d4104a42ae36be87194c46c47
|
||||
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
|
||||
FBSDKCoreKit: 572b047a7e029bc44542bcf8a59414e7ff2b543e
|
||||
FBSDKLoginKit: 88cb456349cfb3b554427ce4f8b43729d85dfb40
|
||||
FBSDKShareKit: b7b5002833a4104fbecad75e8e4e082e91c7a08a
|
||||
FBSDKCoreKit: 6f139173dc63a1deaff4430a55f2fe5bb222d2af
|
||||
FBSDKLoginKit: 56a057ca6822535ea0faa25f57a7c41edb697fd4
|
||||
FBSDKShareKit: 18a2cd118aef11dd657fe7e8b64bae5c719088b2
|
||||
NSDataAES: 967ea3337476a80e9838a533c25d570a06855ed0
|
||||
NSDate_Utils: c858a89da6e204ecf53aca48dbccb4da4d25bc9e
|
||||
NSString-Helper: 645162758421206f509cb46cbd10023eab7594ed
|
||||
NSString-Helper: 459e1b6a62b3bf7db10f01b0d102548608e945c4
|
||||
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
||||
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
||||
PNObject: 524a8d655fb150c0da2f262441bbbe24dd9bd8b9
|
||||
PNObject: 8dc560680a7a48060ed309b019ca4fc41505cc07
|
||||
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
|
||||
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
|
||||
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
|
||||
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
|
||||
UIDevice-Utils: a629b53a88c1429cfb4bdff35b18287feebd164a
|
||||
UIDevice-Utils: ff37bd042127117572d6ce4c5ff074f4f54ab5ed
|
||||
|
||||
PODFILE CHECKSUM: eec9c921f7aee591fd1fdea1fd3e5a191b74a436
|
||||
PODFILE CHECKSUM: fcd5d1cf3426c7c9c5b3e5edcd4b8e5402ee7f2e
|
||||
|
||||
COCOAPODS: 1.5.0
|
||||
COCOAPODS: 1.3.1
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
|
||||
## 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
|
||||
|
||||
@ -94,15 +94,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
@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
|
||||
///---------------------
|
||||
|
||||
@ -98,23 +98,6 @@
|
||||
[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 -
|
||||
|
||||
- (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];
|
||||
if (serializationError) {
|
||||
if (failure) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgnu"
|
||||
dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
|
||||
failure(nil, serializationError);
|
||||
});
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
return nil;
|
||||
@ -276,9 +262,12 @@
|
||||
NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError];
|
||||
if (serializationError) {
|
||||
if (failure) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgnu"
|
||||
dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
|
||||
failure(nil, serializationError);
|
||||
});
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
return nil;
|
||||
|
||||
@ -107,13 +107,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
- (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
|
||||
///--------------------------------------------------
|
||||
|
||||
@ -51,6 +51,8 @@ static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) {
|
||||
static id AFPublicKeyForCertificate(NSData *certificate) {
|
||||
id allowedPublicKey = nil;
|
||||
SecCertificateRef allowedCertificate;
|
||||
SecCertificateRef allowedCertificates[1];
|
||||
CFArrayRef tempCertificates = nil;
|
||||
SecPolicyRef policy = nil;
|
||||
SecTrustRef allowedTrust = nil;
|
||||
SecTrustResultType result;
|
||||
@ -58,8 +60,11 @@ static id AFPublicKeyForCertificate(NSData *certificate) {
|
||||
allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificate);
|
||||
__Require_Quiet(allowedCertificate != NULL, _out);
|
||||
|
||||
allowedCertificates[0] = allowedCertificate;
|
||||
tempCertificates = CFArrayCreate(NULL, (const void **)allowedCertificates, 1, NULL);
|
||||
|
||||
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);
|
||||
|
||||
allowedPublicKey = (__bridge_transfer id)SecTrustCopyPublicKey(allowedTrust);
|
||||
@ -73,6 +78,10 @@ _out:
|
||||
CFRelease(policy);
|
||||
}
|
||||
|
||||
if (tempCertificates) {
|
||||
CFRelease(tempCertificates);
|
||||
}
|
||||
|
||||
if (allowedCertificate) {
|
||||
CFRelease(allowedCertificate);
|
||||
}
|
||||
|
||||
@ -60,7 +60,10 @@ NSString * AFPercentEscapedStringFromString(NSString *string) {
|
||||
NSMutableString *escaped = @"".mutableCopy;
|
||||
|
||||
while (index < string.length) {
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wgnu"
|
||||
NSUInteger length = MIN(string.length - index, batchSize);
|
||||
#pragma GCC diagnostic pop
|
||||
NSRange range = NSMakeRange(index, length);
|
||||
|
||||
// To avoid breaking up character sequences such as 👴🏻👮🏽
|
||||
@ -186,7 +189,6 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb
|
||||
@interface AFHTTPRequestSerializer ()
|
||||
@property (readwrite, nonatomic, strong) NSMutableSet *mutableObservedChangedKeyPaths;
|
||||
@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableHTTPRequestHeaders;
|
||||
@property (readwrite, nonatomic, strong) dispatch_queue_t requestHeaderModificationQueue;
|
||||
@property (readwrite, nonatomic, assign) AFHTTPRequestQueryStringSerializationStyle queryStringSerializationStyle;
|
||||
@property (readwrite, nonatomic, copy) AFQueryStringSerializationBlock queryStringSerialization;
|
||||
@end
|
||||
@ -206,7 +208,6 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb
|
||||
self.stringEncoding = NSUTF8StringEncoding;
|
||||
|
||||
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
|
||||
NSMutableArray *acceptLanguagesComponents = [NSMutableArray array];
|
||||
@ -218,6 +219,8 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb
|
||||
[self setValue:[acceptLanguagesComponents componentsJoinedByString:@", "] forHTTPHeaderField:@"Accept-Language"];
|
||||
|
||||
NSString *userAgent = nil;
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgnu"
|
||||
#if TARGET_OS_IOS
|
||||
// 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]];
|
||||
@ -227,6 +230,7 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb
|
||||
#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]];
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
if (userAgent) {
|
||||
if (![userAgent canBeConvertedToEncoding:NSASCIIStringEncoding]) {
|
||||
NSMutableString *mutableUserAgent = [userAgent mutableCopy];
|
||||
@ -302,27 +306,17 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb
|
||||
#pragma mark -
|
||||
|
||||
- (NSDictionary *)HTTPRequestHeaders {
|
||||
NSDictionary __block *value;
|
||||
dispatch_sync(self.requestHeaderModificationQueue, ^{
|
||||
value = [NSDictionary dictionaryWithDictionary:self.mutableHTTPRequestHeaders];
|
||||
});
|
||||
return value;
|
||||
return [NSDictionary dictionaryWithDictionary:self.mutableHTTPRequestHeaders];
|
||||
}
|
||||
|
||||
- (void)setValue:(NSString *)value
|
||||
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 __block *value;
|
||||
dispatch_sync(self.requestHeaderModificationQueue, ^{
|
||||
value = [self.mutableHTTPRequestHeaders valueForKey:field];
|
||||
});
|
||||
return value;
|
||||
return [self.mutableHTTPRequestHeaders valueForKey:field];
|
||||
}
|
||||
|
||||
- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username
|
||||
@ -334,9 +328,7 @@ forHTTPHeaderField:(NSString *)field
|
||||
}
|
||||
|
||||
- (void)clearAuthorizationHeader {
|
||||
dispatch_barrier_async(self.requestHeaderModificationQueue, ^{
|
||||
[self.mutableHTTPRequestHeaders removeObjectForKey:@"Authorization"];
|
||||
});
|
||||
[self.mutableHTTPRequestHeaders removeObjectForKey:@"Authorization"];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
@ -568,9 +560,7 @@ forHTTPHeaderField:(NSString *)field
|
||||
}
|
||||
|
||||
- (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))];
|
||||
}
|
||||
|
||||
@ -578,9 +568,7 @@ forHTTPHeaderField:(NSString *)field
|
||||
|
||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||
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.queryStringSerialization = self.queryStringSerialization;
|
||||
|
||||
@ -679,11 +667,6 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setRequest:(NSMutableURLRequest *)request
|
||||
{
|
||||
_request = [request mutableCopy];
|
||||
}
|
||||
|
||||
- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
|
||||
name:(NSString *)name
|
||||
error:(NSError * __autoreleasing *)error
|
||||
@ -852,11 +835,14 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
|
||||
@end
|
||||
|
||||
@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)
|
||||
@synthesize delegate;
|
||||
#endif
|
||||
@synthesize streamStatus;
|
||||
@synthesize streamError;
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding {
|
||||
self = [super init];
|
||||
@ -902,6 +888,8 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
|
||||
|
||||
NSInteger totalNumberOfBytesRead = 0;
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgnu"
|
||||
while ((NSUInteger)totalNumberOfBytesRead < MIN(length, self.numberOfBytesInPacket)) {
|
||||
if (!self.currentHTTPBodyPart || ![self.currentHTTPBodyPart hasBytesAvailable]) {
|
||||
if (!(self.currentHTTPBodyPart = [self.HTTPBodyPartEnumerator nextObject])) {
|
||||
@ -922,6 +910,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
return totalNumberOfBytesRead;
|
||||
}
|
||||
@ -1102,6 +1091,8 @@ typedef enum {
|
||||
return YES;
|
||||
}
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wcovered-switch-default"
|
||||
switch (self.inputStream.streamStatus) {
|
||||
case NSStreamStatusNotOpen:
|
||||
case NSStreamStatusOpening:
|
||||
@ -1115,6 +1106,7 @@ typedef enum {
|
||||
default:
|
||||
return NO;
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
- (NSInteger)read:(uint8_t *)buffer
|
||||
@ -1159,8 +1151,11 @@ typedef enum {
|
||||
intoBuffer:(uint8_t *)buffer
|
||||
maxLength:(NSUInteger)length
|
||||
{
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgnu"
|
||||
NSRange range = NSMakeRange((NSUInteger)_phaseReadOffset, MIN([data length] - ((NSUInteger)_phaseReadOffset), length));
|
||||
[data getBytes:buffer range:range];
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
_phaseReadOffset += range.length;
|
||||
|
||||
@ -1179,6 +1174,8 @@ typedef enum {
|
||||
return YES;
|
||||
}
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wcovered-switch-default"
|
||||
switch (_phase) {
|
||||
case AFEncapsulationBoundaryPhase:
|
||||
_phase = AFHeaderPhase;
|
||||
@ -1198,6 +1195,7 @@ typedef enum {
|
||||
break;
|
||||
}
|
||||
_phaseReadOffset = 0;
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
return YES;
|
||||
}
|
||||
@ -1259,21 +1257,7 @@ typedef enum {
|
||||
[mutableRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
|
||||
}
|
||||
|
||||
if (![NSJSONSerialization isValidJSONObject:parameters]) {
|
||||
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];
|
||||
[mutableRequest setHTTPBody:[NSJSONSerialization dataWithJSONObject:parameters options:self.writingOptions error:error]];
|
||||
}
|
||||
|
||||
return mutableRequest;
|
||||
@ -1352,13 +1336,7 @@ typedef enum {
|
||||
[mutableRequest setValue:@"application/x-plist" forHTTPHeaderField:@"Content-Type"];
|
||||
}
|
||||
|
||||
NSData *plistData = [NSPropertyListSerialization dataWithPropertyList:parameters format:self.format options:self.writeOptions error:error];
|
||||
|
||||
if (!plistData) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
[mutableRequest setHTTPBody:plistData];
|
||||
[mutableRequest setHTTPBody:[NSPropertyListSerialization dataWithPropertyList:parameters format:self.format options:self.writeOptions error:error]];
|
||||
}
|
||||
|
||||
return mutableRequest;
|
||||
|
||||
@ -57,7 +57,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (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.
|
||||
@ -108,8 +111,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- `application/json`
|
||||
- `text/json`
|
||||
- `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
|
||||
|
||||
@ -165,7 +166,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (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;
|
||||
|
||||
|
||||
@ -97,6 +97,8 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
||||
return nil;
|
||||
}
|
||||
|
||||
self.stringEncoding = NSUTF8StringEncoding;
|
||||
|
||||
self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)];
|
||||
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.
|
||||
// See https://github.com/rails/rails/issues/1742
|
||||
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;
|
||||
}
|
||||
|
||||
NSError *serializationError = nil;
|
||||
|
||||
id responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError];
|
||||
|
||||
if (!responseObject)
|
||||
{
|
||||
if (error) {
|
||||
*error = AFErrorWithUnderlyingError(serializationError, *error);
|
||||
}
|
||||
return nil;
|
||||
if (self.removesKeysWithNullValues && responseObject) {
|
||||
responseObject = AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions);
|
||||
}
|
||||
|
||||
if (self.removesKeysWithNullValues) {
|
||||
return AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions);
|
||||
|
||||
if (error) {
|
||||
*error = AFErrorWithUnderlyingError(serializationError, *error);
|
||||
}
|
||||
|
||||
return responseObject;
|
||||
@ -291,7 +288,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
||||
#pragma mark - NSCopying
|
||||
|
||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||
AFJSONResponseSerializer *serializer = [super copyWithZone:zone];
|
||||
AFJSONResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
||||
serializer.readingOptions = self.readingOptions;
|
||||
serializer.removesKeysWithNullValues = self.removesKeysWithNullValues;
|
||||
|
||||
@ -381,14 +378,10 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
||||
NSError *serializationError = nil;
|
||||
NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:data options:self.options error:&serializationError];
|
||||
|
||||
if (!document)
|
||||
{
|
||||
if (error) {
|
||||
*error = AFErrorWithUnderlyingError(serializationError, *error);
|
||||
}
|
||||
return nil;
|
||||
if (error) {
|
||||
*error = AFErrorWithUnderlyingError(serializationError, *error);
|
||||
}
|
||||
|
||||
|
||||
return document;
|
||||
}
|
||||
|
||||
@ -414,7 +407,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
||||
#pragma mark - NSCopying
|
||||
|
||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||
AFXMLDocumentResponseSerializer *serializer = [super copyWithZone:zone];
|
||||
AFXMLDocumentResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
||||
serializer.options = self.options;
|
||||
|
||||
return serializer;
|
||||
@ -465,20 +458,15 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
||||
}
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
id responseObject;
|
||||
NSError *serializationError = nil;
|
||||
|
||||
id responseObject = [NSPropertyListSerialization propertyListWithData:data options:self.readOptions format:NULL error:&serializationError];
|
||||
|
||||
if (!responseObject)
|
||||
{
|
||||
if (error) {
|
||||
*error = AFErrorWithUnderlyingError(serializationError, *error);
|
||||
}
|
||||
return nil;
|
||||
|
||||
if (data) {
|
||||
responseObject = [NSPropertyListSerialization propertyListWithData:data options:self.readOptions format:NULL error:&serializationError];
|
||||
}
|
||||
|
||||
if (error) {
|
||||
*error = AFErrorWithUnderlyingError(serializationError, *error);
|
||||
}
|
||||
|
||||
return responseObject;
|
||||
@ -508,7 +496,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
||||
#pragma mark - NSCopying
|
||||
|
||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||
AFPropertyListResponseSerializer *serializer = [super copyWithZone:zone];
|
||||
AFPropertyListResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
||||
serializer.format = self.format;
|
||||
serializer.readOptions = self.readOptions;
|
||||
|
||||
@ -734,7 +722,7 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r
|
||||
#pragma mark - NSCopying
|
||||
|
||||
- (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
|
||||
serializer.imageScale = self.imageScale;
|
||||
@ -808,7 +796,7 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r
|
||||
#pragma mark - NSCopying
|
||||
|
||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||
AFCompoundResponseSerializer *serializer = [super copyWithZone:zone];
|
||||
AFCompoundResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
||||
serializer.responseSerializers = self.responseSerializers;
|
||||
|
||||
return serializer;
|
||||
|
||||
@ -208,7 +208,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
|
||||
*/
|
||||
- (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.
|
||||
@ -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.
|
||||
*/
|
||||
- (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:`.
|
||||
|
||||
@ -85,6 +85,8 @@ static NSString * const AFURLSessionManagerLockName = @"com.alamofire.networking
|
||||
|
||||
static NSUInteger const AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask = 3;
|
||||
|
||||
static void * AFTaskStateChangedContext = &AFTaskStateChangedContext;
|
||||
|
||||
typedef void (^AFURLSessionDidBecomeInvalidBlock)(NSURLSession *session, NSError *error);
|
||||
typedef NSURLSessionAuthChallengeDisposition (^AFURLSessionDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential);
|
||||
|
||||
@ -112,7 +114,6 @@ typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id re
|
||||
#pragma mark -
|
||||
|
||||
@interface AFURLSessionManagerTaskDelegate : NSObject <NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate>
|
||||
- (instancetype)initWithTask:(NSURLSessionTask *)task;
|
||||
@property (nonatomic, weak) AFURLSessionManager *manager;
|
||||
@property (nonatomic, strong) NSMutableData *mutableData;
|
||||
@property (nonatomic, strong) NSProgress *uploadProgress;
|
||||
@ -126,54 +127,113 @@ typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id re
|
||||
|
||||
@implementation AFURLSessionManagerTaskDelegate
|
||||
|
||||
- (instancetype)initWithTask:(NSURLSessionTask *)task {
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
_mutableData = [NSMutableData data];
|
||||
_uploadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
|
||||
_downloadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
|
||||
|
||||
__weak __typeof__(task) weakTask = task;
|
||||
for (NSProgress *progress in @[ _uploadProgress, _downloadProgress ])
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self.downloadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))];
|
||||
[self.uploadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))];
|
||||
self.mutableData = [NSMutableData data];
|
||||
self.uploadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
|
||||
self.uploadProgress.totalUnitCount = NSURLSessionTransferSizeUnknown;
|
||||
|
||||
self.downloadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
|
||||
self.downloadProgress.totalUnitCount = NSURLSessionTransferSizeUnknown;
|
||||
return self;
|
||||
}
|
||||
|
||||
#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 {
|
||||
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) {
|
||||
self.downloadProgressBlock(object);
|
||||
}
|
||||
@ -191,6 +251,8 @@ typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id re
|
||||
task:(NSURLSessionTask *)task
|
||||
didCompleteWithError:(NSError *)error
|
||||
{
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgnu"
|
||||
__strong AFURLSessionManager *manager = self.manager;
|
||||
|
||||
__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
|
||||
dataTask:(__unused NSURLSessionDataTask *)dataTask
|
||||
didReceiveData:(NSData *)data
|
||||
{
|
||||
self.downloadProgress.totalUnitCount = dataTask.countOfBytesExpectedToReceive;
|
||||
self.downloadProgress.completedUnitCount = dataTask.countOfBytesReceived;
|
||||
|
||||
[self.mutableData appendData:data];
|
||||
}
|
||||
|
||||
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task
|
||||
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;
|
||||
}
|
||||
#pragma mark - NSURLSessionDownloadTaskDelegate
|
||||
|
||||
- (void)URLSession:(NSURLSession *)session
|
||||
downloadTask:(NSURLSessionDownloadTask *)downloadTask
|
||||
didFinishDownloadingToURL:(NSURL *)location
|
||||
{
|
||||
NSError *fileManagerError = nil;
|
||||
self.downloadFileURL = nil;
|
||||
|
||||
if (self.downloadTaskDidFinishDownloading) {
|
||||
self.downloadFileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location);
|
||||
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];
|
||||
}
|
||||
}
|
||||
@ -573,6 +608,7 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
||||
|
||||
[self.lock lock];
|
||||
self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)] = delegate;
|
||||
[delegate setupProgressForTask:task];
|
||||
[self addNotificationObserverForTask:task];
|
||||
[self.lock unlock];
|
||||
}
|
||||
@ -582,7 +618,7 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
||||
downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock
|
||||
completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
|
||||
{
|
||||
AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] initWithTask:dataTask];
|
||||
AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init];
|
||||
delegate.manager = self;
|
||||
delegate.completionHandler = completionHandler;
|
||||
|
||||
@ -597,7 +633,7 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
||||
progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock
|
||||
completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
|
||||
{
|
||||
AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] initWithTask:uploadTask];
|
||||
AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init];
|
||||
delegate.manager = self;
|
||||
delegate.completionHandler = completionHandler;
|
||||
|
||||
@ -613,7 +649,7 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
||||
destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
|
||||
completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler
|
||||
{
|
||||
AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] initWithTask:downloadTask];
|
||||
AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init];
|
||||
delegate.manager = self;
|
||||
delegate.completionHandler = completionHandler;
|
||||
|
||||
@ -633,7 +669,9 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
||||
- (void)removeDelegateForTask:(NSURLSessionTask *)task {
|
||||
NSParameterAssert(task);
|
||||
|
||||
AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task];
|
||||
[self.lock lock];
|
||||
[delegate cleanUpProgressForTask:task];
|
||||
[self removeNotificationObserverForTask:task];
|
||||
[self.mutableTaskDelegatesKeyedByTaskIdentifier removeObjectForKey:@(task.taskIdentifier)];
|
||||
[self.lock unlock];
|
||||
@ -682,11 +720,13 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
||||
#pragma mark -
|
||||
|
||||
- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks {
|
||||
if (cancelPendingTasks) {
|
||||
[self.session invalidateAndCancel];
|
||||
} else {
|
||||
[self.session finishTasksAndInvalidate];
|
||||
}
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (cancelPendingTasks) {
|
||||
[self.session invalidateAndCancel];
|
||||
} else {
|
||||
[self.session finishTasksAndInvalidate];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
@ -741,21 +781,16 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
||||
__block NSURLSessionUploadTask *uploadTask = nil;
|
||||
url_session_manager_create_task_safely(^{
|
||||
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) {
|
||||
[self addDelegateForUploadTask:uploadTask
|
||||
progress:uploadProgressBlock
|
||||
completionHandler:completionHandler];
|
||||
|
||||
if (!uploadTask && self.attemptsToRecreateUploadTasksForBackgroundSessions && self.session.configuration.identifier) {
|
||||
for (NSUInteger attempts = 0; !uploadTask && attempts < AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask; attempts++) {
|
||||
uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
|
||||
}
|
||||
}
|
||||
|
||||
[self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler];
|
||||
|
||||
return uploadTask;
|
||||
}
|
||||
|
||||
@ -1038,12 +1073,6 @@ totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend
|
||||
totalUnitCount = (int64_t) [contentLength longLongValue];
|
||||
}
|
||||
}
|
||||
|
||||
AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task];
|
||||
|
||||
if (delegate) {
|
||||
[delegate URLSession:session task:task didSendBodyData:bytesSent totalBytesSent:totalBytesSent totalBytesExpectedToSend:totalBytesExpectedToSend];
|
||||
}
|
||||
|
||||
if (self.taskDidSendBodyData) {
|
||||
self.taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalUnitCount);
|
||||
@ -1150,8 +1179,8 @@ didFinishDownloadingToURL:(NSURL *)location
|
||||
if (fileURL) {
|
||||
delegate.downloadFileURL = fileURL;
|
||||
NSError *error = nil;
|
||||
|
||||
if (![[NSFileManager defaultManager] moveItemAtURL:location toURL:fileURL error:&error]) {
|
||||
[[NSFileManager defaultManager] moveItemAtURL:location toURL:fileURL error:&error];
|
||||
if (error) {
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:error.userInfo];
|
||||
}
|
||||
|
||||
@ -1170,13 +1199,6 @@ didFinishDownloadingToURL:(NSURL *)location
|
||||
totalBytesWritten:(int64_t)totalBytesWritten
|
||||
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) {
|
||||
self.downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite);
|
||||
}
|
||||
@ -1187,13 +1209,6 @@ totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
|
||||
didResumeAtOffset:(int64_t)fileOffset
|
||||
expectedTotalBytes:(int64_t)expectedTotalBytes
|
||||
{
|
||||
|
||||
AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask];
|
||||
|
||||
if (delegate) {
|
||||
[delegate URLSession:session downloadTask:downloadTask didResumeAtOffset:fileOffset expectedTotalBytes:expectedTotalBytes];
|
||||
}
|
||||
|
||||
if (self.downloadTaskDidResume) {
|
||||
self.downloadTaskDidResume(session, downloadTask, fileOffset, expectedTotalBytes);
|
||||
}
|
||||
|
||||
2
Example/Pods/AFNetworking/LICENSE
generated
2
Example/Pods/AFNetworking/LICENSE
generated
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2011-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
12
Example/Pods/AFNetworking/README.md
generated
12
Example/Pods/AFNetworking/README.md
generated
@ -9,7 +9,7 @@
|
||||
[](http://cocoadocs.org/docsets/AFNetworking)
|
||||
[](http://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.
|
||||
|
||||
@ -51,9 +51,7 @@ To integrate AFNetworking into your Xcode project using CocoaPods, specify it in
|
||||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
platform :ios, '8.0'
|
||||
|
||||
target 'TargetName' do
|
||||
pod 'AFNetworking', '~> 3.0'
|
||||
end
|
||||
```
|
||||
|
||||
Then, run the following command:
|
||||
@ -83,7 +81,7 @@ Run `carthage` to build the framework and drag the built `AFNetworking.framework
|
||||
|
||||
## 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. |
|
||||
| 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 |
|
||||
| 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.
|
||||
|
||||
@ -112,7 +110,7 @@ Run `carthage` to build the framework and drag the built `AFNetworking.framework
|
||||
- `AFHTTPResponseSerializer`
|
||||
- `AFJSONResponseSerializer`
|
||||
- `AFXMLParserResponseSerializer`
|
||||
- `AFXMLDocumentResponseSerializer` _(macOS)_
|
||||
- `AFXMLDocumentResponseSerializer` _(Mac OS X)_
|
||||
- `AFPropertyListResponseSerializer`
|
||||
- `AFImageResponseSerializer`
|
||||
- `AFCompoundResponseSerializer`
|
||||
@ -319,4 +317,4 @@ If you believe you have identified a security vulnerability with AFNetworking, y
|
||||
|
||||
## License
|
||||
|
||||
AFNetworking is released under the MIT license. See [LICENSE](https://github.com/AFNetworking/AFNetworking/blob/master/LICENSE) for details.
|
||||
AFNetworking is released under the MIT license. See LICENSE for details.
|
||||
|
||||
@ -72,17 +72,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
@protocol AFImageRequestCache <AFImageCache>
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
|
||||
@ -196,10 +196,6 @@
|
||||
return key;
|
||||
}
|
||||
|
||||
- (BOOL)shouldCacheImage:(UIImage *)image forRequest:(NSURLRequest *)request withAdditionalIdentifier:(nullable NSString *)identifier {
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
||||
@ -81,11 +81,6 @@ typedef NS_ENUM(NSInteger, AFImageDownloadPrioritization) {
|
||||
*/
|
||||
+ (NSURLCache *)defaultURLCache;
|
||||
|
||||
/**
|
||||
The default `NSURLSessionConfiguration` with common usage parameter values.
|
||||
*/
|
||||
+ (NSURLSessionConfiguration *)defaultURLSessionConfiguration;
|
||||
|
||||
/**
|
||||
Default initializer
|
||||
|
||||
@ -93,15 +88,6 @@ typedef NS_ENUM(NSInteger, AFImageDownloadPrioritization) {
|
||||
*/
|
||||
- (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.
|
||||
|
||||
|
||||
@ -106,20 +106,10 @@
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation AFImageDownloader
|
||||
|
||||
+ (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
|
||||
diskCapacity:150 * 1024 * 1024
|
||||
diskPath:@"com.alamofire.imagedownloader"];
|
||||
@ -143,11 +133,7 @@
|
||||
|
||||
- (instancetype)init {
|
||||
NSURLSessionConfiguration *defaultConfiguration = [self.class defaultURLSessionConfiguration];
|
||||
return [self initWithSessionConfiguration:defaultConfiguration];
|
||||
}
|
||||
|
||||
- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration {
|
||||
AFHTTPSessionManager *sessionManager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:configuration];
|
||||
AFHTTPSessionManager *sessionManager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:defaultConfiguration];
|
||||
sessionManager.responseSerializer = [AFImageResponseSerializer serializer];
|
||||
|
||||
return [self initWithSessionManager:sessionManager
|
||||
@ -249,12 +235,10 @@
|
||||
|
||||
createdTask = [self.sessionManager
|
||||
dataTaskWithRequest:request
|
||||
uploadProgress:nil
|
||||
downloadProgress:nil
|
||||
completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
|
||||
dispatch_async(self.responseQueue, ^{
|
||||
__strong __typeof__(weakSelf) strongSelf = weakSelf;
|
||||
AFImageDownloaderMergedTask *mergedTask = strongSelf.mergedTasks[URLIdentifier];
|
||||
AFImageDownloaderMergedTask *mergedTask = self.mergedTasks[URLIdentifier];
|
||||
if ([mergedTask.identifier isEqual:mergedTaskIdentifier]) {
|
||||
mergedTask = [strongSelf safelyRemoveMergedTaskWithURLIdentifier:URLIdentifier];
|
||||
if (error) {
|
||||
@ -266,9 +250,7 @@
|
||||
}
|
||||
}
|
||||
} 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) {
|
||||
if (handler.successBlock) {
|
||||
|
||||
@ -147,7 +147,10 @@ typedef void (^AFNetworkActivityActionBlock)(BOOL networkActivityIndicatorVisibl
|
||||
- (void)decrementActivityCount {
|
||||
[self willChangeValueForKey:@"activityCount"];
|
||||
@synchronized(self) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgnu"
|
||||
_activityCount = MAX(_activityCount - 1, 0);
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
[self didChangeValueForKey:@"activityCount"];
|
||||
|
||||
@ -191,9 +194,8 @@ typedef void (^AFNetworkActivityActionBlock)(BOOL networkActivityIndicatorVisibl
|
||||
[self startCompletionDelayTimer];
|
||||
break;
|
||||
}
|
||||
[self didChangeValueForKey:@"currentState"];
|
||||
}
|
||||
|
||||
[self didChangeValueForKey:@"currentState"];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -71,12 +71,16 @@
|
||||
|
||||
if (task) {
|
||||
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) {
|
||||
[activityIndicatorView startAnimating];
|
||||
[self.activityIndicatorView startAnimating];
|
||||
} 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_stopAnimating) name:AFNetworkingTaskDidCompleteNotification object:task];
|
||||
@ -89,13 +93,19 @@
|
||||
|
||||
- (void)af_startAnimating {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreceiver-is-weak"
|
||||
[self.activityIndicatorView startAnimating];
|
||||
#pragma clang diagnostic pop
|
||||
});
|
||||
}
|
||||
|
||||
- (void)af_stopAnimating {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreceiver-is-weak"
|
||||
[self.activityIndicatorView stopAnimating];
|
||||
#pragma clang diagnostic pop
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -103,7 +103,10 @@ static const char * af_backgroundImageDownloadReceiptKeyForState(UIControlState
|
||||
|
||||
+ (AFImageDownloader *)sharedImageDownloader {
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgnu"
|
||||
return objc_getAssociatedObject(self, @selector(sharedImageDownloader)) ?: [AFImageDownloader defaultInstance];
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
+ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader {
|
||||
|
||||
@ -48,7 +48,11 @@
|
||||
@implementation UIImageView (AFNetworking)
|
||||
|
||||
+ (AFImageDownloader *)sharedImageDownloader {
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgnu"
|
||||
return objc_getAssociatedObject(self, @selector(sharedImageDownloader)) ?: [AFImageDownloader defaultInstance];
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
+ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader {
|
||||
|
||||
@ -55,10 +55,6 @@ static void * AFTaskCountOfBytesReceivedContext = &AFTaskCountOfBytesReceivedCon
|
||||
- (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task
|
||||
animated:(BOOL)animated
|
||||
{
|
||||
if (task.state == NSURLSessionTaskStateCompleted) {
|
||||
return;
|
||||
}
|
||||
|
||||
[task addObserver:self forKeyPath:@"state" 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
|
||||
animated:(BOOL)animated
|
||||
{
|
||||
if (task.state == NSURLSessionTaskStateCompleted) {
|
||||
return;
|
||||
}
|
||||
|
||||
[task addObserver:self forKeyPath:@"state" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext];
|
||||
[task addObserver:self forKeyPath:@"countOfBytesReceived" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext];
|
||||
|
||||
|
||||
@ -71,16 +71,19 @@
|
||||
[notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil];
|
||||
|
||||
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) {
|
||||
[refreshControl beginRefreshing];
|
||||
[self.refreshControl beginRefreshing];
|
||||
|
||||
[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:AFNetworkingTaskDidSuspendNotification object:task];
|
||||
} else {
|
||||
[refreshControl endRefreshing];
|
||||
[self.refreshControl endRefreshing];
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,13 +91,19 @@
|
||||
|
||||
- (void)af_beginRefreshing {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreceiver-is-weak"
|
||||
[self.refreshControl beginRefreshing];
|
||||
#pragma clang diagnostic pop
|
||||
});
|
||||
}
|
||||
|
||||
- (void)af_endRefreshing {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreceiver-is-weak"
|
||||
[self.refreshControl endRefreshing];
|
||||
#pragma clang diagnostic pop
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -58,7 +58,10 @@
|
||||
_af_defaultHTTPSessionManager.responseSerializer = [AFHTTPResponseSerializer serializer];
|
||||
});
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgnu"
|
||||
return objc_getAssociatedObject(self, @selector(sessionManager)) ?: _af_defaultHTTPSessionManager;
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
- (void)setSessionManager:(AFHTTPSessionManager *)sessionManager {
|
||||
@ -72,7 +75,10 @@
|
||||
_af_defaultResponseSerializer = [AFHTTPResponseSerializer serializer];
|
||||
});
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgnu"
|
||||
return objc_getAssociatedObject(self, @selector(responseSerializer)) ?: _af_defaultResponseSerializer;
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
- (void)setResponseSerializer:(AFHTTPResponseSerializer<AFURLResponseSerialization> *)responseSerializer {
|
||||
@ -119,28 +125,27 @@
|
||||
self.af_URLSessionTask = nil;
|
||||
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
__block NSURLSessionDataTask *dataTask;
|
||||
NSURLSessionDataTask *dataTask;
|
||||
dataTask = [self.sessionManager
|
||||
dataTaskWithRequest:request
|
||||
uploadProgress:nil
|
||||
downloadProgress:nil
|
||||
completionHandler:^(NSURLResponse * _Nonnull response, id _Nonnull responseObject, NSError * _Nullable error) {
|
||||
__strong __typeof(weakSelf) strongSelf = weakSelf;
|
||||
if (error) {
|
||||
if (failure) {
|
||||
failure(error);
|
||||
}
|
||||
} else {
|
||||
if (success) {
|
||||
success((NSHTTPURLResponse *)response, responseObject);
|
||||
}
|
||||
[strongSelf loadData:responseObject MIMEType:MIMEType textEncodingName:textEncodingName baseURL:[dataTask.currentRequest URL]];
|
||||
GET:request.URL.absoluteString
|
||||
parameters:nil
|
||||
progress:nil
|
||||
success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) {
|
||||
__strong __typeof(weakSelf) strongSelf = weakSelf;
|
||||
if (success) {
|
||||
success((NSHTTPURLResponse *)task.response, responseObject);
|
||||
}
|
||||
[strongSelf loadData:responseObject MIMEType:MIMEType textEncodingName:textEncodingName baseURL:[task.currentRequest URL]];
|
||||
|
||||
if ([strongSelf.delegate respondsToSelector:@selector(webViewDidFinishLoad:)]) {
|
||||
[strongSelf.delegate webViewDidFinishLoad:strongSelf];
|
||||
}
|
||||
}
|
||||
}];
|
||||
if ([strongSelf.delegate respondsToSelector:@selector(webViewDidStartLoad:)]) {
|
||||
[strongSelf.delegate webViewDidFinishLoad:strongSelf];
|
||||
}
|
||||
}
|
||||
failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
|
||||
if (failure) {
|
||||
failure(error);
|
||||
}
|
||||
}];
|
||||
self.af_URLSessionTask = dataTask;
|
||||
if (progress != nil) {
|
||||
*progress = [self.sessionManager downloadProgressForTask:dataTask];
|
||||
@ -154,4 +159,4 @@
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -60,12 +60,6 @@ FBSDK_EXTERN NSString *const FBSDKAccessTokenChangeOldKey;
|
||||
*/
|
||||
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.
|
||||
@ -107,11 +101,6 @@ FBSDK_EXTERN NSString *const FBSDKAccessTokenDidExpire;
|
||||
*/
|
||||
@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)new NS_UNAVAILABLE;
|
||||
|
||||
@ -161,12 +150,6 @@ NS_DESIGNATED_INITIALIZER;
|
||||
*/
|
||||
+ (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.
|
||||
- Parameter token: The access token to set.
|
||||
|
||||
@ -27,7 +27,6 @@ NSString *const FBSDKAccessTokenDidChangeNotification = @"com.facebook.sdk.FBSDK
|
||||
NSString *const FBSDKAccessTokenDidChangeUserID = @"FBSDKAccessTokenDidChangeUserID";
|
||||
NSString *const FBSDKAccessTokenChangeNewKey = @"FBSDKAccessToken";
|
||||
NSString *const FBSDKAccessTokenChangeOldKey = @"FBSDKAccessTokenOld";
|
||||
NSString *const FBSDKAccessTokenDidExpire = @"FBSDKAccessTokenDidExpire";
|
||||
|
||||
static FBSDKAccessToken *g_currentAccessToken;
|
||||
|
||||
@ -71,11 +70,6 @@ static FBSDKAccessToken *g_currentAccessToken;
|
||||
return [self.permissions containsObject:permission];
|
||||
}
|
||||
|
||||
- (BOOL)isExpired
|
||||
{
|
||||
return [self.expirationDate compare:NSDate.date] == NSOrderedAscending;
|
||||
}
|
||||
|
||||
+ (FBSDKAccessToken *)currentAccessToken
|
||||
{
|
||||
return g_currentAccessToken;
|
||||
@ -87,8 +81,7 @@ static FBSDKAccessToken *g_currentAccessToken;
|
||||
NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
|
||||
[FBSDKInternalUtility dictionary:userInfo setObject:token forKey:FBSDKAccessTokenChangeNewKey];
|
||||
[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] || ![self currentAccessTokenIsActive]) {
|
||||
if (![g_currentAccessToken.userID isEqualToString:token.userID]) {
|
||||
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
|
||||
{
|
||||
if ([FBSDKAccessToken currentAccessToken]) {
|
||||
|
||||
@ -122,7 +122,6 @@ NSString *const FBSDKAppEventNameFBSDKLikeButtonImpression = @"fb_like_bu
|
||||
NSString *const FBSDKAppEventNameFBSDKLoginButtonImpression = @"fb_login_button_impression";
|
||||
NSString *const FBSDKAppEventNameFBSDKSendButtonImpression = @"fb_send_button_impression";
|
||||
NSString *const FBSDKAppEventNameFBSDKShareButtonImpression = @"fb_share_button_impression";
|
||||
NSString *const FBSDKAppEventNameFBSDKLiveStreamingButtonImpression = @"fb_live_streaming_button_impression";
|
||||
|
||||
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 FBSDKAppEventNameFBSDKSendButtonDidTap = @"fb_send_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 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 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
|
||||
NSString *const FBSDKAppEventParameterDialogOutcome = @"fb_dialog_outcome";
|
||||
NSString *const FBSDKAppEventParameterDialogErrorMessage = @"fb_dialog_outcome_error_message";
|
||||
@ -174,13 +162,6 @@ NSString *const FBSDKAppEventParameterLogTime = @"_logTime";
|
||||
NSString *const FBSDKAppEventParameterEventName = @"_eventName";
|
||||
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
|
||||
NSString *const FBSDKAppEventsDialogOutcomeValue_Completed = @"Completed";
|
||||
NSString *const FBSDKAppEventsDialogOutcomeValue_Cancelled = @"Cancelled";
|
||||
@ -239,14 +220,13 @@ static NSString *g_overrideAppID = nil;
|
||||
|
||||
@property (nonatomic, copy) NSString *pushNotificationsDeviceTokenString;
|
||||
|
||||
@property (nonatomic, strong) dispatch_source_t flushTimer;
|
||||
@property (nonatomic, strong) dispatch_source_t attributionIDRecheckTimer;
|
||||
|
||||
@end
|
||||
|
||||
@implementation FBSDKAppEvents
|
||||
{
|
||||
BOOL _explicitEventsLoggedYet;
|
||||
NSTimer *_flushTimer;
|
||||
NSTimer *_attributionIDRecheckTimer;
|
||||
FBSDKServerConfiguration *_serverConfiguration;
|
||||
FBSDKAppEventsState *_appEventsState;
|
||||
NSString *_userID;
|
||||
@ -266,18 +246,18 @@ static NSString *g_overrideAppID = nil;
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_flushBehavior = FBSDKAppEventsFlushBehaviorAuto;
|
||||
|
||||
typeof(self) __weak weakSelf = self;
|
||||
self.flushTimer = [FBSDKUtility startGCDTimerWithInterval:FLUSH_PERIOD_IN_SECONDS
|
||||
block:^{
|
||||
[weakSelf flushTimerFired:nil];
|
||||
}];
|
||||
|
||||
self.attributionIDRecheckTimer = [FBSDKUtility startGCDTimerWithInterval:APP_SUPPORTS_ATTRIBUTION_ID_RECHECK_PERIOD
|
||||
block:^{
|
||||
[weakSelf appSettingsFetchStateResetTimerFired:nil];
|
||||
}];
|
||||
|
||||
_flushTimer = [NSTimer timerWithTimeInterval:FLUSH_PERIOD_IN_SECONDS
|
||||
target:self
|
||||
selector:@selector(flushTimerFired:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
_attributionIDRecheckTimer = [NSTimer timerWithTimeInterval:APP_SUPPORTS_ATTRIBUTION_ID_RECHECK_PERIOD
|
||||
target:self
|
||||
selector:@selector(appSettingsFetchStateResetTimerFired:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
[[NSRunLoop mainRunLoop] addTimer:_flushTimer forMode:NSDefaultRunLoopMode];
|
||||
[[NSRunLoop mainRunLoop] addTimer:_attributionIDRecheckTimer forMode:NSDefaultRunLoopMode];
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(applicationMovingFromActiveStateOrTerminating)
|
||||
@ -306,8 +286,10 @@ static NSString *g_overrideAppID = nil;
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[FBSDKUtility stopGCDTimer:self.flushTimer];
|
||||
[FBSDKUtility stopGCDTimer:self.attributionIDRecheckTimer];
|
||||
// technically these timers retain self so there's a cycle but
|
||||
// we're a singleton anyway.
|
||||
[_flushTimer invalidate];
|
||||
[_attributionIDRecheckTimer invalidate];
|
||||
}
|
||||
|
||||
#pragma mark - Public Methods
|
||||
@ -612,10 +594,6 @@ static NSString *g_overrideAppID = nil;
|
||||
- (void)publishInstall
|
||||
{
|
||||
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];
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
if ([defaults objectForKey:lastAttributionPingString]) {
|
||||
@ -805,21 +783,15 @@ static NSString *g_overrideAppID = nil;
|
||||
- (void)flushOnMainQueue:(FBSDKAppEventsState *)appEventsState
|
||||
forReason:(FBSDKAppEventsFlushReason)reason
|
||||
{
|
||||
|
||||
if (appEventsState.events.count == 0) {
|
||||
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])];
|
||||
|
||||
[self fetchServerConfiguration:^(void) {
|
||||
NSString *receipt_data = [appEventsState extractReceiptData];
|
||||
NSString *encodedEvents = [appEventsState JSONStringForEvents:_serverConfiguration.implicitLoggingEnabled];
|
||||
NSString *JSONString = [appEventsState JSONStringForEvents:_serverConfiguration.implicitLoggingEnabled];
|
||||
NSData *encodedEvents = [JSONString dataUsingEncoding:NSUTF8StringEncoding];
|
||||
if (!encodedEvents) {
|
||||
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents
|
||||
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[@"custom_events"] = encodedEvents;
|
||||
postParameters[@"custom_events_file"] = encodedEvents;
|
||||
if (appEventsState.numSkipped > 0) {
|
||||
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
|
||||
// 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 || errorCode == 404) ? FlushResultServerError : FlushResultNoConnectivity;
|
||||
flushResult = errorCode == 400 ? FlushResultServerError : FlushResultNoConnectivity;
|
||||
}
|
||||
|
||||
if (flushResult == FlushResultServerError) {
|
||||
|
||||
@ -55,7 +55,9 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
||||
FBSDKBridgeAPIRequest *_pendingRequest;
|
||||
FBSDKBridgeAPICallbackBlock _pendingRequestCompletionBlock;
|
||||
id<FBSDKURLOpening> _pendingURLOpen;
|
||||
#ifdef __IPHONE_11_0
|
||||
SFAuthenticationSession *_authenticationSession NS_AVAILABLE_IOS(11_0);
|
||||
#endif
|
||||
#endif
|
||||
BOOL _expectingBackground;
|
||||
UIViewController *_safariViewController;
|
||||
@ -170,12 +172,12 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
||||
completion:completePendingOpenURLBlock];
|
||||
_safariViewController = nil;
|
||||
} else {
|
||||
if (@available(iOS 11.0, *)) {
|
||||
if (_authenticationSession != nil) {
|
||||
[_authenticationSession cancel];
|
||||
_authenticationSession = nil;
|
||||
}
|
||||
#ifdef __IPHONE_11_0
|
||||
if (_authenticationSession != nil) {
|
||||
[_authenticationSession cancel];
|
||||
_authenticationSession = nil;
|
||||
}
|
||||
#endif
|
||||
completePendingOpenURLBlock();
|
||||
}
|
||||
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.
|
||||
BOOL notExpectingBackground = !_expectingBackground && !_safariViewController && !_isDismissingSafariViewController;
|
||||
#if !TARGET_OS_TV
|
||||
if (@available(iOS 11.0, *)) {
|
||||
notExpectingBackground = notExpectingBackground && !_authenticationSession;
|
||||
}
|
||||
#ifdef __IPHONE_11_0
|
||||
notExpectingBackground = notExpectingBackground && !_authenticationSession;
|
||||
#endif
|
||||
#endif
|
||||
if (notExpectingBackground) {
|
||||
_active = YES;
|
||||
@ -345,22 +347,22 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
||||
_expectingBackground = NO;
|
||||
_pendingURLOpen = sender;
|
||||
|
||||
if (@available(iOS 11.0, *)) {
|
||||
if ([sender isAuthenticationURL:url]) {
|
||||
Class SFAuthenticationSessionClass = fbsdkdfl_SFAuthenticationSessionClass();
|
||||
if (SFAuthenticationSessionClass != nil) {
|
||||
_authenticationSession = [[SFAuthenticationSessionClass alloc] initWithURL:url callbackURLScheme:[FBSDKInternalUtility appURLScheme] completionHandler:^ (NSURL *aURL, NSError *error) {
|
||||
handler(error == nil, error);
|
||||
if (error == nil) {
|
||||
[self application:[UIApplication sharedApplication] openURL:aURL sourceApplication:@"com.apple" annotation:nil];
|
||||
}
|
||||
_authenticationSession = nil;
|
||||
}];
|
||||
[_authenticationSession start];
|
||||
return;
|
||||
}
|
||||
#ifdef __IPHONE_11_0
|
||||
if ([sender isAuthenticationURL:url]) {
|
||||
Class SFAuthenticationSessionClass = fbsdkdfl_SFAuthenticationSessionClass();
|
||||
if (SFAuthenticationSessionClass != nil) {
|
||||
_authenticationSession = [[SFAuthenticationSessionClass alloc] initWithURL:url callbackURLScheme:[FBSDKInternalUtility appURLScheme] completionHandler:^ (NSURL *aURL, NSError *error) {
|
||||
handler(error == nil, error);
|
||||
if (error == nil) {
|
||||
[self application:[UIApplication sharedApplication] openURL:aURL sourceApplication:@"com.apple" annotation:nil];
|
||||
}
|
||||
_authenticationSession = nil;
|
||||
}];
|
||||
[_authenticationSession start];
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// trying to dynamically load SFSafariViewController class
|
||||
// so for the cases when it is available we can send users through Safari View Controller flow
|
||||
|
||||
@ -44,5 +44,5 @@
|
||||
#import <FBSDKCoreKit/FBSDKDeviceViewControllerBase.h>
|
||||
#endif
|
||||
|
||||
#define FBSDK_VERSION_STRING @"4.33.0"
|
||||
#define FBSDK_TARGET_PLATFORM_VERSION @"v3.0"
|
||||
#define FBSDK_VERSION_STRING @"4.29.0"
|
||||
#define FBSDK_TARGET_PLATFORM_VERSION @"v2.11"
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
|
||||
// constants
|
||||
static NSString *const kGetHTTPMethod = @"GET";
|
||||
static NSString *const kPostHTTPMethod = @"POST";
|
||||
|
||||
@interface FBSDKGraphRequest()
|
||||
@property (nonatomic, assign) FBSDKGraphRequestFlags flags;
|
||||
@ -145,23 +144,12 @@ static NSString *const kPostHTTPMethod = @"POST";
|
||||
+ (NSString *)serializeURL:(NSString *)baseUrl
|
||||
params:(NSDictionary *)params
|
||||
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];
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
NSURL *parsedURL = [NSURL URLWithString:[baseUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
|
||||
#pragma clang pop
|
||||
if ([httpMethod isEqualToString:kPostHTTPMethod] && !forBatch) {
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
NSString *queryPrefix = parsedURL.query ? @"&" : @"?";
|
||||
|
||||
NSString *query = [FBSDKInternalUtility queryStringWithDictionary:params error:NULL invalidObjectHandler:^id(id object, BOOL *stop) {
|
||||
|
||||
@ -60,26 +60,6 @@ static NSTimeInterval g_defaultTimeout = 60.0;
|
||||
|
||||
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
|
||||
|
||||
@ -463,7 +443,7 @@ NSURLSessionDataDelegate
|
||||
NSUInteger bodyLength = [[body data] length] / 1024;
|
||||
|
||||
[request setValue:[FBSDKGraphRequestConnection userAgent] forHTTPHeaderField:@"User-Agent"];
|
||||
[request setValue:[body mimeContentType] forHTTPHeaderField:@"Content-Type"];
|
||||
[request setValue:[FBSDKGraphRequestBody mimeContentType] forHTTPHeaderField:@"Content-Type"];
|
||||
[request setHTTPShouldHandleCookies:NO];
|
||||
|
||||
[self logRequest:request bodyLength:bodyLength bodyLogger:bodyLogger attachmentLogger:attachmentLogger];
|
||||
@ -515,8 +495,7 @@ NSURLSessionDataDelegate
|
||||
|
||||
NSString *url = [FBSDKGraphRequest serializeURL:baseURL
|
||||
params:request.parameters
|
||||
httpMethod:request.HTTPMethod
|
||||
forBatch:forBatch];
|
||||
httpMethod:request.HTTPMethod];
|
||||
return url;
|
||||
}
|
||||
|
||||
@ -679,7 +658,7 @@ NSURLSessionDataDelegate
|
||||
error:(NSError **)error
|
||||
{
|
||||
id parsed = nil;
|
||||
if (!(*error) && [utf8 isKindOfClass:[NSString class]]) {
|
||||
if (!(*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.
|
||||
// which is shouldn't be necessary since Graph API v2.1.
|
||||
@ -761,16 +740,10 @@ NSURLSessionDataDelegate
|
||||
};
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
void (^clearToken)(NSInteger) = ^(NSInteger errorSubcode){
|
||||
if (metadata.request.flags & FBSDKGraphRequestFlagDoNotInvalidateTokenOnError) {
|
||||
return;
|
||||
}
|
||||
if (errorSubcode == 493) {
|
||||
[FBSDKAccessToken setCurrentAccessToken:_CreateExpiredAccessToken([FBSDKAccessToken currentAccessToken])];
|
||||
} else {
|
||||
void (^clearToken)(void) = ^{
|
||||
if (!(metadata.request.flags & FBSDKGraphRequestFlagDoNotInvalidateTokenOnError)) {
|
||||
[FBSDKAccessToken setCurrentAccessToken:nil];
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
FBSDKSystemAccountStoreAdapter *adapter = [FBSDKSystemAccountStoreAdapter sharedInstance];
|
||||
@ -795,14 +768,14 @@ NSURLSessionDataDelegate
|
||||
[adapter renewSystemAuthorization:^(ACAccountCredentialRenewResult result, NSError *renewError) {
|
||||
NSOperationQueue *queue = _delegateQueue ?: [NSOperationQueue mainQueue];
|
||||
[queue addOperationWithBlock:^{
|
||||
clearToken(errorSubcode);
|
||||
clearToken();
|
||||
finishAndInvokeCompletionHandler();
|
||||
}];
|
||||
}];
|
||||
return;
|
||||
}
|
||||
}
|
||||
clearToken(errorSubcode);
|
||||
clearToken();
|
||||
} else if (errorCode >= 200 && errorCode < 300) {
|
||||
// permission error
|
||||
[adapter renewSystemAuthorization:^(ACAccountCredentialRenewResult result, NSError *renewError) {
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
#import "FBSDKSettings+Internal.h"
|
||||
|
||||
#import "FBSDKAccessTokenCache.h"
|
||||
#import "FBSDKAccessTokenExpirer.h"
|
||||
#import "FBSDKCoreKit.h"
|
||||
|
||||
#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 NSString *g_userAgentSuffix;
|
||||
static NSString *g_defaultGraphAPIVersion;
|
||||
static FBSDKAccessTokenExpirer *g_accessTokenExpirer;
|
||||
|
||||
@implementation FBSDKSettings
|
||||
|
||||
@ -61,7 +59,6 @@ static FBSDKAccessTokenExpirer *g_accessTokenExpirer;
|
||||
{
|
||||
if (self == [FBSDKSettings class]) {
|
||||
g_tokenCache = [[FBSDKAccessTokenCache alloc] init];
|
||||
g_accessTokenExpirer = [[FBSDKAccessTokenExpirer alloc] init];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -52,18 +52,4 @@
|
||||
*/
|
||||
+ (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
|
||||
|
||||
@ -81,32 +81,6 @@
|
||||
}
|
||||
#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
|
||||
{
|
||||
FBSDK_NO_DESIGNATED_INITIALIZER();
|
||||
|
||||
@ -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 */
|
||||
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 */
|
||||
FBSDK_EXTERN NSString *const FBSDLAppEventNameFBSDKEventShareDialogResult;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKEventMessengerShareDialogResult;
|
||||
@ -123,14 +112,6 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterDialogShareContentPageID;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterShareTrayActivityName;
|
||||
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
|
||||
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventsDialogOutcomeValue_Completed;
|
||||
@ -166,7 +147,6 @@ FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLikeButtonImpression;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLoginButtonImpression;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKSendButtonImpression;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKShareButtonImpression;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLiveStreamingButtonImpression;
|
||||
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKSmartLoginService;
|
||||
|
||||
@ -174,7 +154,6 @@ FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLikeButtonDidTap;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLoginButtonDidTap;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKSendButtonDidTap;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKShareButtonDidTap;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLiveStreamingButtonDidTap;
|
||||
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLikeControlDidDisable;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLikeControlDidLike;
|
||||
|
||||
@ -714,7 +714,11 @@ static NSMapTable *_transientObjects;
|
||||
|
||||
if (![self isRegisteredCanOpenURLScheme: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];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -51,7 +51,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKGraphRequestFlags)
|
||||
+ (BOOL)isAttachment:(id)item;
|
||||
+ (NSString *)serializeURL:(NSString *)baseUrl
|
||||
params:(NSDictionary *)params
|
||||
httpMethod:(NSString *)httpMethod
|
||||
forBatch:(BOOL)forBatch;
|
||||
httpMethod:(NSString *)httpMethod;
|
||||
|
||||
@end
|
||||
|
||||
@ -42,6 +42,6 @@
|
||||
dataAttachmentValue:(FBSDKGraphRequestDataAttachment *)dataAttachment
|
||||
logger:(FBSDKLogger *)logger;
|
||||
|
||||
- (NSString *)mimeContentType;
|
||||
+ (NSString *)mimeContentType;
|
||||
|
||||
@end
|
||||
|
||||
@ -28,26 +28,20 @@
|
||||
@implementation FBSDKGraphRequestBody
|
||||
{
|
||||
NSMutableData *_data;
|
||||
NSMutableDictionary *_json;
|
||||
}
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_data = [[NSMutableData alloc] init];
|
||||
_json = [NSMutableDictionary dictionary];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *)mimeContentType
|
||||
+ (NSString *)mimeContentType
|
||||
{
|
||||
if (_json) {
|
||||
return @"application/json";
|
||||
} else {
|
||||
return [NSString stringWithFormat:@"multipart/form-data; boundary=%@",kStringBoundary];
|
||||
}
|
||||
return [NSString stringWithFormat:@"multipart/form-data; boundary=%@", kStringBoundary];
|
||||
}
|
||||
|
||||
- (void)appendUTF8:(NSString *)utf8
|
||||
@ -68,9 +62,6 @@
|
||||
[self _appendWithKey:key filename:nil contentType:nil contentBlock:^{
|
||||
[self appendUTF8:value];
|
||||
}];
|
||||
if (key && value) {
|
||||
[_json setObject:value forKey:key];
|
||||
}
|
||||
[logger appendFormat:@"\n %@:\t%@", key, (NSString *)value];
|
||||
}
|
||||
|
||||
@ -82,7 +73,6 @@
|
||||
[self _appendWithKey:key filename:key contentType:@"image/jpeg" contentBlock:^{
|
||||
[_data appendData:data];
|
||||
}];
|
||||
_json = nil;
|
||||
[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:^{
|
||||
[_data appendData:data];
|
||||
}];
|
||||
_json = nil;
|
||||
[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:^{
|
||||
[_data appendData:data];
|
||||
}];
|
||||
_json = nil;
|
||||
[logger appendFormat:@"\n %@:\t<Data - %lu kB>", key, (unsigned long)([data length] / 1024)];
|
||||
}
|
||||
|
||||
- (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];
|
||||
}
|
||||
|
||||
|
||||
@ -53,7 +53,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationSmartLoginOptions)
|
||||
advertisingIDEnabled:(BOOL)advertisingIDEnabled
|
||||
implicitLoggingEnabled:(BOOL)implicitLoggingEnabled
|
||||
implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
appIndexingTriggerEnabled:(BOOL)appIndexingTriggerEnabled
|
||||
systemAuthenticationEnabled:(BOOL)systemAuthenticationEnabled
|
||||
nativeAuthFlowEnabled:(BOOL)nativeAuthFlowEnabled
|
||||
dialogConfigurations:(NSDictionary *)dialogConfigurations
|
||||
@ -66,7 +65,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
smartLoginOptions:(FBSDKServerConfigurationSmartLoginOptions)smartLoginOptions
|
||||
smartLoginBookmarkIconURL:(NSURL *)smartLoginBookmarkIconURL
|
||||
smartLoginMenuIconURL:(NSURL *)smartLoginMenuIconURL
|
||||
updateMessage:(NSString *)updateMessage
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
@property (nonatomic, assign, readonly, getter=isAdvertisingIDEnabled) BOOL advertisingIDEnabled;
|
||||
@ -77,7 +75,6 @@ NS_DESIGNATED_INITIALIZER;
|
||||
@property (nonatomic, strong, readonly) FBSDKErrorConfiguration *errorConfiguration;
|
||||
@property (nonatomic, assign, readonly, getter=isImplicitLoggingSupported) BOOL implicitLoggingEnabled;
|
||||
@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=isNativeAuthFlowEnabled) BOOL nativeAuthFlowEnabled;
|
||||
@property (nonatomic, assign, readonly, getter=isSystemAuthenticationEnabled) BOOL systemAuthenticationEnabled;
|
||||
@ -88,7 +85,6 @@ NS_DESIGNATED_INITIALIZER;
|
||||
@property (nonatomic, assign, readonly) FBSDKServerConfigurationSmartLoginOptions smartLoginOptions;
|
||||
@property (nonatomic, copy, readonly) NSURL *smartLoginBookmarkIconURL;
|
||||
@property (nonatomic, copy, readonly) NSURL *smartLoginMenuIconURL;
|
||||
@property (nonatomic, copy, readonly) NSString *updateMessage;
|
||||
@property (nonatomic, readonly) NSInteger version;
|
||||
|
||||
- (FBSDKDialogConfiguration *)dialogConfigurationForDialogName:(NSString *)dialogName;
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
#define FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_KEY @"implicitLoggingEnabled"
|
||||
#define FBSDK_SERVER_CONFIGURATION_DEFAULT_SHARE_MODE_KEY @"defaultShareMode"
|
||||
#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_TEXT_KEY @"loginTooltipText"
|
||||
#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_BOOKMARK_ICON_URL_KEY @"smarstLoginBookmarkIconURL"
|
||||
#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"
|
||||
|
||||
#pragma mark - Dialog Names
|
||||
@ -89,7 +87,6 @@ const NSInteger FBSDKServerConfigurationVersion = 2;
|
||||
advertisingIDEnabled:(BOOL)advertisingIDEnabled
|
||||
implicitLoggingEnabled:(BOOL)implicitLoggingEnabled
|
||||
implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
appIndexingTriggerEnabled:(BOOL)appIndexingTriggerEnabled
|
||||
systemAuthenticationEnabled:(BOOL)systemAuthenticationEnabled
|
||||
nativeAuthFlowEnabled:(BOOL)nativeAuthFlowEnabled
|
||||
dialogConfigurations:(NSDictionary *)dialogConfigurations
|
||||
@ -102,7 +99,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
smartLoginOptions:(FBSDKServerConfigurationSmartLoginOptions)smartLoginOptions
|
||||
smartLoginBookmarkIconURL:(NSURL *)smartLoginBookmarkIconURL
|
||||
smartLoginMenuIconURL:(NSURL *)smartLoginMenuIconURL
|
||||
updateMessage:(NSString *)updateMessage
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_appID = [appID copy];
|
||||
@ -113,7 +109,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
_advertisingIDEnabled = advertisingIDEnabled;
|
||||
_implicitLoggingEnabled = implicitLoggingEnabled;
|
||||
_implicitPurchaseLoggingEnabled = implicitPurchaseLoggingEnabled;
|
||||
_appIndexingTriggerEnabled = appIndexingTriggerEnabled;
|
||||
_systemAuthenticationEnabled = systemAuthenticationEnabled;
|
||||
_nativeAuthFlowEnabled = nativeAuthFlowEnabled;
|
||||
_dialogConfigurations = [dialogConfigurations copy];
|
||||
@ -126,7 +121,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
_smartLoginOptions = smartLoginOptions;
|
||||
_smartLoginMenuIconURL = [smartLoginMenuIconURL copy];
|
||||
_smartLoginBookmarkIconURL = [smartLoginBookmarkIconURL copy];
|
||||
_updateMessage = [updateMessage copy];
|
||||
_version = FBSDKServerConfigurationVersion;
|
||||
}
|
||||
return self;
|
||||
@ -183,8 +177,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
BOOL implicitLoggingEnabled = [decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_KEY];
|
||||
BOOL implicitPurchaseLoggingEnabled =
|
||||
[decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_PURCHASE_LOGGING_ENABLED_KEY];
|
||||
BOOL appIndexingTriggerEnabled =
|
||||
[decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_APP_INDEXING_TRIGGER_ENABLED_KEY];
|
||||
BOOL systemAuthenticationEnabled =
|
||||
[decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_ENABLED_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];
|
||||
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];
|
||||
NSString *updateMessage = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_KEY];
|
||||
NSInteger version = [decoder decodeIntegerForKey:FBSDK_SERVER_CONFIGURATION_VERSION_KEY];
|
||||
FBSDKServerConfiguration *configuration = [self initWithAppID:appID
|
||||
appName:appName
|
||||
@ -218,7 +209,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
advertisingIDEnabled:advertisingIDEnabled
|
||||
implicitLoggingEnabled:implicitLoggingEnabled
|
||||
implicitPurchaseLoggingEnabled:implicitPurchaseLoggingEnabled
|
||||
appIndexingTriggerEnabled:appIndexingTriggerEnabled
|
||||
systemAuthenticationEnabled:systemAuthenticationEnabled
|
||||
nativeAuthFlowEnabled:nativeAuthFlowEnabled
|
||||
dialogConfigurations:dialogConfigurations
|
||||
@ -231,7 +221,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
smartLoginOptions:smartLoginOptions
|
||||
smartLoginBookmarkIconURL:smartLoginBookmarkIconURL
|
||||
smartLoginMenuIconURL:smartLoginMenuIconURL
|
||||
updateMessage:updateMessage
|
||||
];
|
||||
configuration->_version = version;
|
||||
return configuration;
|
||||
@ -249,8 +238,6 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
[encoder encodeBool:_implicitLoggingEnabled forKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_KEY];
|
||||
[encoder encodeBool:_implicitPurchaseLoggingEnabled
|
||||
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 encodeObject:_loginTooltipText forKey:FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_TEXT_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 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:_updateMessage forKey:FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_KEY];
|
||||
[encoder encodeInteger:_version forKey:FBSDK_SERVER_CONFIGURATION_VERSION_KEY];
|
||||
}
|
||||
|
||||
|
||||
@ -50,7 +50,6 @@
|
||||
#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_MENU_ICON_URL_FIELD @"smart_login_menu_icon_url"
|
||||
#define FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_FIELD @"sdk_update_message"
|
||||
|
||||
@implementation FBSDKServerConfigurationManager
|
||||
|
||||
@ -60,14 +59,12 @@ static FBSDKServerConfiguration *_serverConfiguration;
|
||||
static NSError *_serverConfigurationError;
|
||||
static NSDate *_serverConfigurationErrorTimestamp;
|
||||
static const NSTimeInterval kTimeout = 4.0;
|
||||
static BOOL _printedUpdateMessage;
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
||||
{
|
||||
FBSDKServerConfigurationManagerAppEventsFeaturesNone = 0,
|
||||
FBSDKServerConfigurationManagerAppEventsFeaturesAdvertisingIDEnabled = 1 << 0,
|
||||
FBSDKServerConfigurationManagerAppEventsFeaturesImplicitPurchaseLoggingEnabled = 1 << 1,
|
||||
FBSDKServerConfigurationManagerAppEventsFeaturesAppIndexingTriggerEnabled = 1 << 6,
|
||||
};
|
||||
|
||||
#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]];
|
||||
BOOL advertisingIDEnabled = (appEventsFeatures & FBSDKServerConfigurationManagerAppEventsFeaturesAdvertisingIDEnabled);
|
||||
BOOL implicitPurchaseLoggingEnabled = (appEventsFeatures & FBSDKServerConfigurationManagerAppEventsFeaturesImplicitPurchaseLoggingEnabled);
|
||||
BOOL appIndexingTriggerEnabled = (appEventsFeatures & FBSDKServerConfigurationManagerAppEventsFeaturesAppIndexingTriggerEnabled);
|
||||
|
||||
NSString *appName = [FBSDKTypeUtility stringValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_APP_NAME_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]];
|
||||
@ -193,7 +190,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
||||
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 *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
|
||||
appName:appName
|
||||
loginTooltipEnabled:loginTooltipEnabled
|
||||
@ -202,7 +198,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
||||
advertisingIDEnabled:advertisingIDEnabled
|
||||
implicitLoggingEnabled:implicitLoggingEnabled
|
||||
implicitPurchaseLoggingEnabled:implicitPurchaseLoggingEnabled
|
||||
appIndexingTriggerEnabled:appIndexingTriggerEnabled
|
||||
systemAuthenticationEnabled:systemAuthenticationEnabled
|
||||
nativeAuthFlowEnabled:nativeAuthFlowEnabled
|
||||
dialogConfigurations:dialogConfigurations
|
||||
@ -215,7 +210,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
||||
smartLoginOptions:smartLoginOptions
|
||||
smartLoginBookmarkIconURL:smartLoginBookmarkIconURL
|
||||
smartLoginMenuIconURL:smartLoginMenuIconURL
|
||||
updateMessage:updateMessage
|
||||
];
|
||||
#if TARGET_OS_TV
|
||||
// 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_SESSION_TIMEOUT_FIELD,
|
||||
FBSDK_SERVER_CONFIGURATION_LOGGIN_TOKEN_FIELD
|
||||
#ifdef DEBUG
|
||||
,FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_FIELD
|
||||
#endif
|
||||
#if TARGET_OS_TV
|
||||
,FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_FIELD,
|
||||
FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_FIELD,
|
||||
@ -307,7 +298,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
||||
advertisingIDEnabled:NO
|
||||
implicitLoggingEnabled:NO
|
||||
implicitPurchaseLoggingEnabled:NO
|
||||
appIndexingTriggerEnabled:NO
|
||||
systemAuthenticationEnabled:NO
|
||||
nativeAuthFlowEnabled:NO
|
||||
dialogConfigurations:nil
|
||||
@ -320,7 +310,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
||||
smartLoginOptions:FBSDKServerConfigurationSmartLoginOptionsUnknown
|
||||
smartLoginBookmarkIconURL:nil
|
||||
smartLoginMenuIconURL:nil
|
||||
updateMessage:nil
|
||||
];
|
||||
}
|
||||
return _defaultServerConfiguration;
|
||||
@ -350,14 +339,6 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
||||
_serverConfiguration = serverConfiguration;
|
||||
_serverConfigurationError = 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
|
||||
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -211,7 +211,7 @@ static const CGFloat kPaddingBetweenLogoTitle = 8.0;
|
||||
|
||||
- (void)_accessTokenDidChangeNotification:(NSNotification *)notification
|
||||
{
|
||||
if (notification.userInfo[FBSDKAccessTokenDidChangeUserID] || notification.userInfo[FBSDKAccessTokenDidExpire]) {
|
||||
if (notification.userInfo[FBSDKAccessTokenDidChangeUserID]) {
|
||||
[self _updateContent];
|
||||
}
|
||||
}
|
||||
@ -219,7 +219,7 @@ static const CGFloat kPaddingBetweenLogoTitle = 8.0;
|
||||
- (void)_buttonPressed:(id)sender
|
||||
{
|
||||
[self logTapEventWithEventName:FBSDKAppEventNameFBSDKLoginButtonDidTap parameters:[self analyticsParameters]];
|
||||
if ([FBSDKAccessToken currentAccessTokenIsActive]) {
|
||||
if ([FBSDKAccessToken currentAccessToken]) {
|
||||
NSString *title = nil;
|
||||
|
||||
if (_userName) {
|
||||
@ -338,9 +338,8 @@ static const CGFloat kPaddingBetweenLogoTitle = 8.0;
|
||||
|
||||
- (void)_updateContent
|
||||
{
|
||||
BOOL accessTokenIsValid = [FBSDKAccessToken currentAccessTokenIsActive];
|
||||
self.selected = accessTokenIsValid;
|
||||
if (accessTokenIsValid) {
|
||||
self.selected = ([FBSDKAccessToken currentAccessToken] != nil);
|
||||
if ([FBSDKAccessToken currentAccessToken]) {
|
||||
if (![[FBSDKAccessToken currentAccessToken].userID isEqualToString:_userID]) {
|
||||
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me?fields=id,name"
|
||||
parameters:nil
|
||||
|
||||
@ -74,26 +74,3 @@ typedef NS_ENUM(NSInteger, FBSDKLoginErrorCode)
|
||||
*/
|
||||
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
|
||||
};
|
||||
|
||||
@ -18,18 +18,8 @@
|
||||
|
||||
#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/FBSDKLoginConstants.h>
|
||||
#import <FBSDKLoginKit/FBSDKLoginManager.h>
|
||||
#import <FBSDKLoginKit/FBSDKLoginManagerLoginResult.h>
|
||||
#import <FBSDKLoginKit/FBSDKLoginTooltipView.h>
|
||||
#else
|
||||
#import <FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.h>
|
||||
#import <FBSDKLoginKit/FBSDKDeviceLoginManager.h>
|
||||
#import <FBSDKLoginKit/FBSDKDeviceLoginManagerResult.h>
|
||||
#import <FBSDKLoginKit/FBSDKLoginConstants.h>
|
||||
#endif
|
||||
|
||||
@ -49,7 +49,6 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
||||
FBSDKLoginManagerLogger *_logger;
|
||||
FBSDKLoginManagerState _state;
|
||||
FBSDKKeychainStore *_keychainStore;
|
||||
BOOL _usedSFAuthSession;
|
||||
}
|
||||
|
||||
+ (void)initialize
|
||||
@ -160,14 +159,6 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
||||
{
|
||||
switch (_state) {
|
||||
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."
|
||||
"This is unsupported behavior. You should wait until the previous login handler gets called to start a new login.";
|
||||
[FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors
|
||||
@ -207,8 +198,6 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
||||
|
||||
- (void)completeAuthentication:(FBSDKLoginCompletionParameters *)parameters expectChallenge:(BOOL)expectChallenge
|
||||
{
|
||||
NSSet *recentlyGrantedPermissions = nil;
|
||||
NSSet *recentlyDeclinedPermissions = nil;
|
||||
FBSDKLoginManagerLoginResult *result = nil;
|
||||
NSError *error = parameters.error;
|
||||
|
||||
@ -237,6 +226,9 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
||||
NSSet *grantedPermissions = parameters.permissions;
|
||||
NSSet *declinedPermissions = parameters.declinedPermissions;
|
||||
|
||||
NSSet *recentlyGrantedPermissions = nil;
|
||||
NSSet *recentlyDeclinedPermissions = nil;
|
||||
|
||||
[self determineRecentlyGrantedPermissions:&recentlyGrantedPermissions
|
||||
recentlyDeclinedPermissions:&recentlyDeclinedPermissions
|
||||
forGrantedPermission:grantedPermissions
|
||||
@ -267,18 +259,13 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
||||
|
||||
if (cancelled) {
|
||||
NSSet *declinedPermissions = nil;
|
||||
if ([FBSDKAccessToken currentAccessToken] != nil) {
|
||||
if (parameters.isSystemAccount) {
|
||||
// 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
|
||||
// doesn't register the decline with Facebook, which is why we don't update the
|
||||
// access token.
|
||||
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;
|
||||
}
|
||||
|
||||
// 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
|
||||
// doesn't register the decline with Facebook, which is why we don't update the
|
||||
// access token.
|
||||
if ([FBSDKAccessToken currentAccessToken] != nil && parameters.isSystemAccount) {
|
||||
declinedPermissions = parameters.declinedPermissions;
|
||||
}
|
||||
|
||||
result = [[FBSDKLoginManagerLoginResult alloc] initWithToken:nil
|
||||
@ -395,7 +382,6 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
||||
{
|
||||
FBSDKServerConfiguration *serverConfiguration = [FBSDKServerConfigurationManager cachedServerConfiguration];
|
||||
NSDictionary *loginParams = [self logInParametersWithPermissions:_requestedPermissions serverConfiguration:serverConfiguration];
|
||||
self->_usedSFAuthSession = NO;
|
||||
|
||||
void(^completion)(BOOL, NSString *, NSError *) = ^void(BOOL didPerformLogIn, NSString *authMethod, NSError *error) {
|
||||
if (didPerformLogIn) {
|
||||
@ -432,7 +418,7 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
// Intentional fall through. Switching to browser login instead.
|
||||
// intentional fall through.
|
||||
}
|
||||
case FBSDKLoginBehaviorBrowser: {
|
||||
[self performBrowserLogInWithParameters:loginParams handler:^(BOOL openedURL,
|
||||
@ -562,10 +548,8 @@ typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) {
|
||||
handler(didOpen, authMethod, anError);
|
||||
}
|
||||
};
|
||||
|
||||
if (useSafariViewController) {
|
||||
// Note based on above, authURL must be a http scheme. If that changes, add a guard, otherwise SFVC can throw
|
||||
self->_usedSFAuthSession = YES;
|
||||
// Note based on above, authURL must be a http scheme. If that changes, add a guard, otherwise SFVC can throw
|
||||
[[FBSDKApplicationDelegate sharedInstance] openURLWithSafariViewController:authURL
|
||||
sender:self
|
||||
fromViewController:self.fromViewController
|
||||
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -21,32 +21,12 @@
|
||||
#import <FBSDKShareKit/FBSDKSharing.h>
|
||||
|
||||
/**
|
||||
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.
|
||||
A dialog for sharing content through Messenger.
|
||||
*/
|
||||
@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 delegate: The receiver's delegate.
|
||||
*/
|
||||
|
||||
@ -35,22 +35,6 @@ static NSString *const kButtonsKey = @"buttons";
|
||||
|
||||
@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,
|
||||
FBSDKShareMessengerURLActionButton *urlButton)
|
||||
{
|
||||
@ -184,15 +168,6 @@ static NSArray *_SerializableOpenGraphMusicTemplateContentFromContent(FBSDKShare
|
||||
return serializableOpenGraphMusicTemplateContent;
|
||||
}
|
||||
|
||||
static NSString *_MediaTemplateURLSerializationKey(NSURL *mediaURL)
|
||||
{
|
||||
if (_URLHasFacebookDomain(mediaURL)) {
|
||||
return @"facebook_media_url";
|
||||
} else {
|
||||
return @"image_url";
|
||||
}
|
||||
}
|
||||
|
||||
+ (void)_addToParameters:(NSMutableDictionary *)parameters
|
||||
contentForShare:(NSMutableDictionary *)contentForShare
|
||||
contentForPreview:(NSMutableDictionary *)contentForPreview
|
||||
@ -257,9 +232,7 @@ forShareMessengerMediaTemplateContent:(FBSDKShareMessengerMediaTemplateContent *
|
||||
NSMutableDictionary *contentForPreview = [NSMutableDictionary dictionary];
|
||||
[FBSDKInternalUtility dictionary:contentForPreview setObject:@"DEFAULT" forKey:@"preview_type"];
|
||||
[FBSDKInternalUtility dictionary:contentForPreview setObject:mediaTemplateContent.attachmentID forKey:@"attachment_id"];
|
||||
[FBSDKInternalUtility dictionary:contentForPreview
|
||||
setObject:mediaTemplateContent.mediaURL.absoluteString
|
||||
forKey:_MediaTemplateURLSerializationKey(mediaTemplateContent.mediaURL)];
|
||||
[FBSDKInternalUtility dictionary:contentForPreview setObject:mediaTemplateContent.mediaURL.absoluteString forKey:@"facebook_media_url"];
|
||||
[FBSDKInternalUtility dictionary:contentForPreview setObject:_MediaTypeString(mediaTemplateContent.mediaType) forKey:@"media_type"];
|
||||
_AddToContentPreviewDictionaryForButton(contentForPreview, mediaTemplateContent.button);
|
||||
|
||||
|
||||
@ -1 +0,0 @@
|
||||
../../../FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenExpirer.h
|
||||
@ -1 +0,0 @@
|
||||
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginCodeInfo+Internal.h
|
||||
@ -1 +0,0 @@
|
||||
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.h
|
||||
@ -1 +0,0 @@
|
||||
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginError.h
|
||||
@ -1 +0,0 @@
|
||||
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.h
|
||||
@ -1 +0,0 @@
|
||||
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginManagerResult+Internal.h
|
||||
@ -1 +0,0 @@
|
||||
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManagerResult.h
|
||||
@ -1 +0,0 @@
|
||||
../../../../../PNObject/Classes/PNObject+PNObjectDELETEConnection.h
|
||||
@ -1 +0,0 @@
|
||||
../../../../../PNObject/Classes/PNObject+PNObjectGETConnection.h
|
||||
@ -1 +0,0 @@
|
||||
../../../../../PNObject/Classes/PNObject+PNObjectPOSTConnection.h
|
||||
@ -1 +0,0 @@
|
||||
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.h
|
||||
@ -1 +0,0 @@
|
||||
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.h
|
||||
@ -1 +0,0 @@
|
||||
../../../FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManagerResult.h
|
||||
@ -1 +0,0 @@
|
||||
../../../../../PNObject/Classes/PNObject+PNObjectDELETEConnection.h
|
||||
@ -1 +0,0 @@
|
||||
../../../../../PNObject/Classes/PNObject+PNObjectGETConnection.h
|
||||
@ -1 +0,0 @@
|
||||
../../../../../PNObject/Classes/PNObject+PNObjectPOSTConnection.h
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "PNObject",
|
||||
"version": "2.5.7",
|
||||
"version": "1.3.4",
|
||||
"summary": "PNObject is a simple replica of the more complex ParseObject",
|
||||
"homepage": "https://github.com/giuseppenucifora/PNObject",
|
||||
"license": {
|
||||
@ -12,7 +12,7 @@
|
||||
},
|
||||
"source": {
|
||||
"git": "https://github.com/giuseppenucifora/PNObject.git",
|
||||
"tag": "2.5.7"
|
||||
"tag": "1.3.4"
|
||||
},
|
||||
"platforms": {
|
||||
"ios": "8.0"
|
||||
|
||||
78
Example/Pods/Manifest.lock
generated
78
Example/Pods/Manifest.lock
generated
@ -1,18 +1,18 @@
|
||||
PODS:
|
||||
- AFNetworking (3.2.0):
|
||||
- AFNetworking/NSURLSession (= 3.2.0)
|
||||
- AFNetworking/Reachability (= 3.2.0)
|
||||
- AFNetworking/Security (= 3.2.0)
|
||||
- AFNetworking/Serialization (= 3.2.0)
|
||||
- AFNetworking/UIKit (= 3.2.0)
|
||||
- AFNetworking/NSURLSession (3.2.0):
|
||||
- AFNetworking (3.1.0):
|
||||
- AFNetworking/NSURLSession (= 3.1.0)
|
||||
- AFNetworking/Reachability (= 3.1.0)
|
||||
- AFNetworking/Security (= 3.1.0)
|
||||
- AFNetworking/Serialization (= 3.1.0)
|
||||
- AFNetworking/UIKit (= 3.1.0)
|
||||
- AFNetworking/NSURLSession (3.1.0):
|
||||
- AFNetworking/Reachability
|
||||
- AFNetworking/Security
|
||||
- AFNetworking/Serialization
|
||||
- AFNetworking/Reachability (3.2.0)
|
||||
- AFNetworking/Security (3.2.0)
|
||||
- AFNetworking/Serialization (3.2.0)
|
||||
- AFNetworking/UIKit (3.2.0):
|
||||
- AFNetworking/Reachability (3.1.0)
|
||||
- AFNetworking/Security (3.1.0)
|
||||
- AFNetworking/Serialization (3.1.0)
|
||||
- AFNetworking/UIKit (3.1.0):
|
||||
- AFNetworking/NSURLSession
|
||||
- Bolts (1.9.0):
|
||||
- Bolts/AppLinks (= 1.9.0)
|
||||
@ -26,19 +26,19 @@ PODS:
|
||||
- DJLocalization/Core (= 1.2.2)
|
||||
- DJLocalization/Core (1.2.2)
|
||||
- Expecta (1.0.6)
|
||||
- FBSDKCoreKit (4.33.0):
|
||||
- FBSDKCoreKit (4.29.0):
|
||||
- Bolts (~> 1.7)
|
||||
- FBSDKLoginKit (4.33.0):
|
||||
- FBSDKLoginKit (4.29.0):
|
||||
- FBSDKCoreKit
|
||||
- FBSDKShareKit (4.29.0):
|
||||
- FBSDKCoreKit
|
||||
- FBSDKShareKit (4.33.0):
|
||||
- FBSDKCoreKit (~> 4.33.0)
|
||||
- NSDataAES (0.2.2)
|
||||
- NSDate_Utils (1.1.0):
|
||||
- DJLocalization
|
||||
- NSString-Helper (1.1.0)
|
||||
- NSString-Helper (1.0.5)
|
||||
- nv-ios-http-status (0.0.1)
|
||||
- PEAR-FileManager-iOS (1.3.1)
|
||||
- PNObject (2.5.7):
|
||||
- PNObject (1.3.4):
|
||||
- AFNetworking
|
||||
- CodFis-Helper
|
||||
- DDDKeychainWrapper
|
||||
@ -58,7 +58,7 @@ PODS:
|
||||
- RZDataBinding (2.1.0)
|
||||
- Specta (1.0.7)
|
||||
- StrongestPasswordValidator (0.1.2)
|
||||
- UIDevice-Utils (1.0.8)
|
||||
- UIDevice-Utils (1.0.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Expecta
|
||||
@ -66,54 +66,32 @@ DEPENDENCIES:
|
||||
- PureLayout
|
||||
- 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:
|
||||
PNObject:
|
||||
:path: "../"
|
||||
:path: ../
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
AFNetworking: 8ac6017b94ea105479f7776e5288e48ae9c59bb4
|
||||
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
|
||||
Bolts: ac6567323eac61e203f6a9763667d0f711be34c8
|
||||
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
||||
DDDKeychainWrapper: e681a4daba6448786fa83b4941f58102a33b1897
|
||||
DJLocalization: 0c84029af375647d4104a42ae36be87194c46c47
|
||||
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
|
||||
FBSDKCoreKit: 572b047a7e029bc44542bcf8a59414e7ff2b543e
|
||||
FBSDKLoginKit: 88cb456349cfb3b554427ce4f8b43729d85dfb40
|
||||
FBSDKShareKit: b7b5002833a4104fbecad75e8e4e082e91c7a08a
|
||||
FBSDKCoreKit: 6f139173dc63a1deaff4430a55f2fe5bb222d2af
|
||||
FBSDKLoginKit: 56a057ca6822535ea0faa25f57a7c41edb697fd4
|
||||
FBSDKShareKit: 18a2cd118aef11dd657fe7e8b64bae5c719088b2
|
||||
NSDataAES: 967ea3337476a80e9838a533c25d570a06855ed0
|
||||
NSDate_Utils: c858a89da6e204ecf53aca48dbccb4da4d25bc9e
|
||||
NSString-Helper: 645162758421206f509cb46cbd10023eab7594ed
|
||||
NSString-Helper: 459e1b6a62b3bf7db10f01b0d102548608e945c4
|
||||
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
||||
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
||||
PNObject: 524a8d655fb150c0da2f262441bbbe24dd9bd8b9
|
||||
PNObject: 8dc560680a7a48060ed309b019ca4fc41505cc07
|
||||
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
|
||||
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
|
||||
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
|
||||
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
|
||||
UIDevice-Utils: a629b53a88c1429cfb4bdff35b18287feebd164a
|
||||
UIDevice-Utils: ff37bd042127117572d6ce4c5ff074f4f54ab5ed
|
||||
|
||||
PODFILE CHECKSUM: eec9c921f7aee591fd1fdea1fd3e5a191b74a436
|
||||
PODFILE CHECKSUM: fcd5d1cf3426c7c9c5b3e5edcd4b8e5402ee7f2e
|
||||
|
||||
COCOAPODS: 1.5.0
|
||||
COCOAPODS: 1.3.1
|
||||
|
||||
@ -22,8 +22,6 @@
|
||||
|
||||
- (BOOL) isValidTaxCode;
|
||||
|
||||
- (BOOL) isValidFirstnameOrLastname;
|
||||
|
||||
- (NSString *) md5;
|
||||
|
||||
- (NSString*) sha1;
|
||||
@ -32,5 +30,4 @@
|
||||
|
||||
- (NSString*) sha512;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@ -46,13 +46,10 @@
|
||||
}
|
||||
|
||||
- (BOOL) isValidUrl {
|
||||
NSString *urlRegEx = @"(http|https)://((\\w)*|([0-9]*)|([-|_])*)+([\\.|/]((\\w)*|([0-9]*)|([-|_])*))+";
|
||||
NSString *urlRegEx2 =@"((?:http|https)://)?(?:www\\.)?[\\w\\d\\-_]+\\.\\w{2,3}(\\.\\w{2})?(/(?<=/)(?:[\\w\\d\\-./_]+)?)?";
|
||||
|
||||
NSString *urlRegEx =
|
||||
@"(http|https)://((\\w)*|([0-9]*)|([-|_])*)+([\\.|/]((\\w)*|([0-9]*)|([-|_])*))+";
|
||||
NSPredicate *urlTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", urlRegEx];
|
||||
NSPredicate *urlTest2 = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", urlRegEx2];
|
||||
|
||||
return [urlTest evaluateWithObject:self]|| [urlTest2 evaluateWithObject:self];
|
||||
return [urlTest evaluateWithObject:self];
|
||||
}
|
||||
|
||||
- (BOOL) isValidTaxCode {
|
||||
@ -62,15 +59,6 @@
|
||||
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
|
||||
|
||||
+ (NSString *) getRandString: (int) length {
|
||||
|
||||
7878
Example/Pods/Pods.xcodeproj/project.pbxproj
generated
7878
Example/Pods/Pods.xcodeproj/project.pbxproj
generated
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,9 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking
|
||||
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AFNetworking
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
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"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_BUILD_DIR = $BUILD_DIR
|
||||
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/AFNetworking
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Bolts
|
||||
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Bolts
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Bolts" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Bolts"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
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_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Bolts
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CodFis-Helper
|
||||
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/CodFis-Helper
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/CodFis-Helper" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CodFis-Helper"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
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_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/CodFis-Helper
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/DDDKeychainWrapper
|
||||
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/DDDKeychainWrapper
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
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"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_BUILD_DIR = $BUILD_DIR
|
||||
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/DDDKeychainWrapper
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/DJLocalization
|
||||
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/DJLocalization
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
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"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_BUILD_DIR = $BUILD_DIR
|
||||
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/DJLocalization
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Expecta
|
||||
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Expecta
|
||||
ENABLE_BITCODE = NO
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
|
||||
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"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_BUILD_DIR = $BUILD_DIR
|
||||
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Expecta
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit
|
||||
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
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"
|
||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts"
|
||||
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"
|
||||
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_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_BUILD_DIR = $BUILD_DIR
|
||||
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/FBSDKCoreKit
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
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
|
||||
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"
|
||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit"
|
||||
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"
|
||||
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_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_BUILD_DIR = $BUILD_DIR
|
||||
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/FBSDKLoginKit
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
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
|
||||
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"
|
||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit"
|
||||
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"
|
||||
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_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_BUILD_DIR = $BUILD_DIR
|
||||
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/FBSDKShareKit
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/NSDataAES
|
||||
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/NSDataAES
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/NSDataAES" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/NSDataAES"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
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_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/NSDataAES
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/NSDate_Utils
|
||||
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/NSDate_Utils
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
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"
|
||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DJLocalization"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
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"
|
||||
PODS_BUILD_DIR = $BUILD_DIR
|
||||
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/NSDate_Utils
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/NSString-Helper
|
||||
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/NSString-Helper
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/NSString-Helper" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/NSString-Helper"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
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_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/NSString-Helper
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PEAR-FileManager-iOS
|
||||
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/PEAR-FileManager-iOS
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
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"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
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_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/PEAR-FileManager-iOS
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PNObject
|
||||
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/PNObject
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
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"
|
||||
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_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
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"
|
||||
PODS_BUILD_DIR = $BUILD_DIR
|
||||
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
|
||||
@ -3,7 +3,7 @@ This application makes use of the following third party libraries:
|
||||
|
||||
## AFNetworking
|
||||
|
||||
Copyright (c) 2011-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
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
Loading…
x
Reference in New Issue
Block a user