Commit 5622848
Fixed bug where the user is not logged in on subsequent sessions
Summary:
Bug reported in GitHub: #695
"FB SDK doesn't keep user logged in on subsequent sessions". It's only happening in the last release of the SDK and on iOS according to user and partner reports. This diff fixes this issue.
According to the instructions in the iOS SDK (https://github.com/facebook/facebook-ios-sdk/blob/41044df838ef3fefe600fb96b6560dc8a2b2a18a/FBSDKCoreKit/FBSDKCoreKit/ApplicationDelegate.swift#L55-L56), "Do not use the method initializeSDK if you are using the SDK within the context of the 'UIApplication' lifecycle", which is the case of the Unity SDK, "Instead use 'application(_:didFinishLaunchingWithOptions:)'"
Basically, the didFinishLaunchingWithOptions method is called after state restoration has occurred (for example, when the app is launched again after it is suspended or in the background). It is needed to restore the user information, such as the access token.
Reviewed By: GMc14
Differential Revision: D48560401
fbshipit-source-id: 6a6269ad8392db164638e24b04a666c71bfe5c7f1 parent b8db43b commit 5622848
File tree
1 file changed
+2
-4
lines changed- UnitySDK/Assets/FacebookSDK/SDK/Editor/iOS
1 file changed
+2
-4
lines changedLines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
394 | 395 | | |
395 | 396 | | |
396 | 397 | | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | 398 | | |
401 | 399 | | |
402 | 400 | | |
| |||
0 commit comments