Thanks for your answer!
However, I’m not sure if I follow - there is no .init() function for Facebook (I’ve double checked by printing the entire “facebook” array, and I see no such function?
So calling it just gives me a runtime error.
And calling facebook.getCurrentAccessToken() just gives me a “nil”; in other words, I don’t have the token
Just to make sure we are talking about the same thing, I don’t mean resuming an app from having it suspended - but from force closing it. To re-state the problem more clearly:
- A user starts the app, and logs in to Facebook.
1.1. Upon this, I save a boolean in a local database like UserIsLoggedIn = true - to save the fact that the user was logged in. If we don’t, the user would have to manually relogin every time the app was force closed.
- User force quits the app (or updates it, or does any action that does a complete exit and relaunch of the app)
- User relaunches the app
- The app checks the database and if UserIsLoggedIn was true, then we quickly run facebook.login to relogin.
4.1a. Before, the facebook.login ran inside the app, so I just showed a quick “loading” indicator for a second, and the user was logged back in. Perfect!
4.1b. Now, facebook.login instead does an app switch, which is very unreliable and jarring for the user when it relaunches the app. This feels like unexpected behaviour. If i instead just run getCurrentAccessToken(), it just gives me a nil value.
It worked perfectly like it was before. Maybe I’m missing something, I can’t quite figure out what the expected solution to this is, with the new v4 of the plugin.