Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Facebook iOS SDK 3.5.1

Summary:
    Bug fixes. See https://developers.facebook.com/ios/change-log-3.x/

Reviewed By: jacl

Test Plan: Release Testing.
  • Loading branch information...
commit 06effac2a044ef97fc7037d9814a363a46b55d71 1 parent 4778430
@chrisp-fb chrisp-fb authored
View
8 samples/RPSSample/RPSSample/RPSFriendsViewController.m
@@ -196,7 +196,13 @@ - (IBAction)clickInviteFriends:(id)sender {
message:@"Please come rock the logic with me!"
title:@"Invite a Friend"
parameters:parameters
- handler:nil
+ handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
+ if (result == FBWebDialogResultDialogCompleted) {
+ NSLog(@"Web dialog complete: %@", resultURL);
+ } else {
+ NSLog(@"Web dialog not complete, error: %@", error.description);
+ }
+ }
friendCache:self.friendCache];
}
View
2  scripts/build_distribution.sh
@@ -96,7 +96,7 @@ $PACKAGEMAKER \
--target 10.5 \
--version $FB_SDK_VERSION \
--out $FB_SDK_PKG \
- --title 'Facebook SDK 3.5 for iOS' \
+ --title 'Facebook SDK 3.5.1 for iOS' \
|| die "PackageMaker reported error"
if [ ! "$CODE_SIGN_IDENTITY" ]; then
View
2  scripts/build_documentation.sh
@@ -45,7 +45,7 @@ rm -rf $DOCSET
hash $APPLEDOC &>/dev/null
if [ "$?" -eq "0" ]; then
- APPLEDOC_DOCSET_NAME="Facebook SDK 3.5 for iOS"
+ APPLEDOC_DOCSET_NAME="Facebook SDK 3.5.1 for iOS"
$APPLEDOC --project-name "$APPLEDOC_DOCSET_NAME" \
--project-company "Facebook" \
--company-id "com.facebook" \
View
16 src/FBDialog.m
@@ -665,12 +665,18 @@ - (void)dialogWillDisappear {
}
- (void)dialogDidSucceed:(NSURL *)url {
- // dismiss before calling into client-code, in case the client code releases us
- [self dismissWithSuccess:YES animated:YES];
+ // retain self for the life of this method, in case we are released by a client
+ id me = [self retain];
- // call into client code
- if ([_delegate respondsToSelector:@selector(dialogCompleteWithUrl:)]) {
- [_delegate dialogCompleteWithUrl:url];
+ @try {
+ // call into client code
+ if ([_delegate respondsToSelector:@selector(dialogCompleteWithUrl:)]) {
+ [_delegate dialogCompleteWithUrl:url];
+ }
+
+ [self dismissWithSuccess:YES animated:YES];
+ } @finally {
+ [me release];
}
}
View
2  src/FBNativeDialogs.h
@@ -105,4 +105,4 @@ __attribute__((deprecated));
*/
+ (BOOL)canPresentShareDialogWithSession:(FBSession*)session __attribute__((deprecated));
-@end
+@end
View
2  src/FBOpenGraphActionShareDialogParams.h
@@ -40,4 +40,4 @@ extern NSString *const FBPostObject;
/*! @abstract The fully qualified type of the Open Graph action. */
@property (nonatomic, copy) NSString *actionType;
-@end
+@end
View
2  src/FBSDKVersion.h
@@ -1,2 +1,2 @@
-#define FB_IOS_SDK_VERSION_STRING @"3.5.0"
+#define FB_IOS_SDK_VERSION_STRING @"3.5.1"
#define FB_IOS_SDK_MIGRATION_BUNDLE @"fbsdk:20130409"
View
35 src/FBSession.m
@@ -826,16 +826,18 @@ - (void)authorizeWithPermissions:(NSArray*)permissions
FBAppAuth:tryFacebookLogin
safariAuth:tryFacebookLogin
fallback:tryFallback
- isReauthorize:isReauthorize];
+ isReauthorize:isReauthorize
+ canFetchAppSettings:YES];
}
- (void)authorizeWithPermissions:(NSArray*)permissions
defaultAudience:(FBSessionDefaultAudience)defaultAudience
integratedAuth:(BOOL)tryIntegratedAuth
FBAppAuth:(BOOL)tryFBAppAuth
- safariAuth:(BOOL)trySafariAuth
+ safariAuth:(BOOL)trySafariAuth
fallback:(BOOL)tryFallback
- isReauthorize:(BOOL)isReauthorize {
+ isReauthorize:(BOOL)isReauthorize
+ canFetchAppSettings:(BOOL)canFetchAppSettings {
// setup parameters for either the safari or inline login
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
self.appID, FBLoginUXClientID,
@@ -894,9 +896,10 @@ - (void)authorizeWithPermissions:(NSArray*)permissions
!TEST_DISABLE_MULTITASKING_LOGIN) {
if (tryFBAppAuth) {
- if ([FBSettings defaultDisplayName] && // Don't autoselect Native Login unless the app has been setup for it.
+ FBFetchedAppSettings *fetchedSettings = [FBUtility fetchedAppSettings];
+ if ([FBSettings defaultDisplayName] && // don't autoselect Native Login unless the app has been setup for it,
+ (fetchedSettings || canFetchAppSettings) && // and we have app-settings available to us, or could fetch if needed
!TEST_DISABLE_FACEBOOKNATIVELOGIN) {
- FBFetchedAppSettings *fetchedSettings = [FBUtility fetchedAppSettings];
if (!fetchedSettings) {
// fetch the settings and call this method again
didRequestAuthorize = YES;
@@ -907,7 +910,8 @@ - (void)authorizeWithPermissions:(NSArray*)permissions
FBAppAuth:tryFBAppAuth
safariAuth:trySafariAuth
fallback:tryFallback
- isReauthorize:isReauthorize];
+ isReauthorize:isReauthorize
+ canFetchAppSettings:NO];
}];
} else if (!fetchedSettings.suppressNativeGdp) {
if (![[FBSettings defaultDisplayName] isEqualToString:fetchedSettings.serverAppName]) {
@@ -1043,12 +1047,13 @@ - (void)authorizeUsingSystemAccountStore:(NSArray*)permissions
// even when OS integrated auth is possible we use native-app/safari
// login if the user has not signed on to Facebook via the OS
[self authorizeWithPermissions:permissions
- defaultAudience:defaultAudience
- integratedAuth:NO
- FBAppAuth:YES
- safariAuth:YES
- fallback:YES
- isReauthorize:NO];
+ defaultAudience:defaultAudience
+ integratedAuth:NO
+ FBAppAuth:YES
+ safariAuth:YES
+ fallback:YES
+ isReauthorize:NO
+ canFetchAppSettings:YES];
} else {
[self logIntegratedAuthInsights:@"Authorization cancelled"
@@ -1277,7 +1282,8 @@ - (BOOL)handleAuthorizationOpen:(NSDictionary*)parameters
FBAppAuth:NO
safariAuth:YES
fallback:NO
- isReauthorize:NO];
+ isReauthorize:NO
+ canFetchAppSettings:YES];
return YES;
}
@@ -1290,7 +1296,8 @@ - (BOOL)handleAuthorizationOpen:(NSDictionary*)parameters
FBAppAuth:NO
safariAuth:NO
fallback:NO
- isReauthorize:NO];
+ isReauthorize:NO
+ canFetchAppSettings:YES];
return YES;
}
View
6 src/tests/FBSessionTests.m
@@ -52,7 +52,8 @@ - (void)authorizeWithPermissions:(NSArray*)permissions
FBAppAuth:(BOOL)tryFBAppAuth
safariAuth:(BOOL)trySafariAuth
fallback:(BOOL)tryFallback
- isReauthorize:(BOOL)isReauthorize;
+ isReauthorize:(BOOL)isReauthorize
+ canFetchAppSettings:(BOOL)canFetchAppSettings;
- (FBSystemAccountStoreAdapter *)getSystemAccountStoreAdapter;
- (void)callReauthorizeHandlerAndClearState:(NSError*)error;
- (BOOL)isSystemAccountStoreAvailable;
@@ -1380,7 +1381,8 @@ - (FBSession *)allocMockSessionWithNoOpAuth {
FBAppAuth:YES
safariAuth:YES
fallback:YES
- isReauthorize:NO];
+ isReauthorize:NO
+ canFetchAppSettings:YES];
return mockSession;
}

2 comments on commit 06effac

@xxcharlie8o5xx

Whats github used for, i found out my gf uses it

@dgutzeit

I am not sure its the right place, but I've discovered an issue with the latest 3.5.1 version of the iOS SDK.
Please see the following stack trace:

Its an infinite loop:

__CFStringEncodeByteStream + 13
1 CoreFoundation CFStringGetBytes + 744
2 CoreFoundation CFStringGetBytes + 744
3 CoreFoundation constructBuffers + 150
4 CoreFoundation _parseComponents + 108
5 CoreFoundation _CFURLInit + 2052
6 CoreFoundation _CFURLInitWithString + 116
7 Foundation -[NSURL(NSURL) initWithString:relativeToURL:] + 152
8 Foundation +[NSURL(NSURL) URLWithString:relativeToURL:] + 52
9 maaii

FBSession.m line 1929
+[FBSession deleteFacebookCookies]
10 maaii

FBSession.m line 863
-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]
11 maaii

FBSession.m line 904
__113-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]_block_invoke
12 maaii

FBUtility.m line 279
+[FBUtility fetchAppSettings:callback:]
13 maaii

FBSession.m line 948
-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]
14 maaii

FBSession.m line 904
__113-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]_block_invoke
15 maaii

FBUtility.m line 279
+[FBUtility fetchAppSettings:callback:]
16 maaii

FBSession.m line 948
-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]
17 maaii

FBSession.m line 904
__113-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]_block_invoke
18 maaii

FBUtility.m line 279
+[FBUtility fetchAppSettings:callback:]
19 maaii

FBSession.m line 948
-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]
20 maaii

FBSession.m line 904
__113-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]_block_invoke
21 maaii

FBUtility.m line 279
+[FBUtility fetchAppSettings:callback:]
22 maaii

FBSession.m line 948
-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]
23 maaii

FBSession.m line 904
__113-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]_block_invoke
24 maaii

FBUtility.m line 279
+[FBUtility fetchAppSettings:callback:]
25 maaii

FBSession.m line 948
-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]
26 maaii

FBSession.m line 904
__113-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]_block_invoke
27 maaii

FBUtility.m line 279
+[FBUtility fetchAppSettings:callback:]
28 maaii

FBSession.m line 948
-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]
29 maaii

FBSession.m line 904
__113-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]_block_invoke
30 maaii

FBUtility.m line 279
+[FBUtility fetchAppSettings:callback:]
31 maaii

FBSession.m line 948
-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]
32 maaii

FBSession.m line 904
__113-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]_block_invoke
33 maaii

FBUtility.m line 279
+[FBUtility fetchAppSettings:callback:]
34 maaii

FBSession.m line 948
-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]
35 maaii

FBSession.m line 904
__113-[FBSession authorizeWithPermissions:defaultAudience:integratedAuth:FBAppAuth:safariAuth:fallback:isReauthorize:]_block_invoke
36 maaii

FBUtility.m line 279
+[FBUtility fetchAppSettings:callback:]

The crash happens quite alot ...

Please sign in to comment.
Something went wrong with that request. Please try again.