Skip to content

Commit

Permalink
Facebook iOS SDK 3.5.1
Browse files Browse the repository at this point in the history
Summary:
    Bug fixes. See https://developers.facebook.com/ios/change-log-3.x/

Reviewed By: jacl

Test Plan: Release Testing.
  • Loading branch information
chrisp-fb committed Apr 24, 2013
1 parent 4778430 commit 06effac
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 27 deletions.
8 changes: 7 additions & 1 deletion samples/RPSSample/RPSSample/RPSFriendsViewController.m
Expand Up @@ -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];
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/build_distribution.sh
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_documentation.sh
Expand Up @@ -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" \
Expand Down
16 changes: 11 additions & 5 deletions src/FBDialog.m
Expand Up @@ -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];
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/FBNativeDialogs.h
Expand Up @@ -105,4 +105,4 @@ __attribute__((deprecated));
*/
+ (BOOL)canPresentShareDialogWithSession:(FBSession*)session __attribute__((deprecated));

@end
@end
2 changes: 1 addition & 1 deletion src/FBOpenGraphActionShareDialogParams.h
Expand Up @@ -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
2 changes: 1 addition & 1 deletion 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"
35 changes: 21 additions & 14 deletions src/FBSession.m
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand All @@ -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]) {
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -1277,7 +1282,8 @@ - (BOOL)handleAuthorizationOpen:(NSDictionary*)parameters
FBAppAuth:NO
safariAuth:YES
fallback:NO
isReauthorize:NO];
isReauthorize:NO
canFetchAppSettings:YES];
return YES;
}

Expand All @@ -1290,7 +1296,8 @@ - (BOOL)handleAuthorizationOpen:(NSDictionary*)parameters
FBAppAuth:NO
safariAuth:NO
fallback:NO
isReauthorize:NO];
isReauthorize:NO
canFetchAppSettings:YES];
return YES;
}

Expand Down
6 changes: 4 additions & 2 deletions src/tests/FBSessionTests.m
Expand Up @@ -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;
Expand Down Expand Up @@ -1380,7 +1381,8 @@ - (FBSession *)allocMockSessionWithNoOpAuth {
FBAppAuth:YES
safariAuth:YES
fallback:YES
isReauthorize:NO];
isReauthorize:NO
canFetchAppSettings:YES];

return mockSession;
}
Expand Down

0 comments on commit 06effac

Please sign in to comment.