Ad

How To Know Coming Back From Facebook?

- 1 answer

How is it possible to test / get notification about Facebook iOS app is just left?

Implemented Facebook Login button, and when coming back from FB login screen, need to do some extra steps in my app. But viewDidAppear is not get called in that view controller.

Do you have any idea? Need to use AppDelegate methods?

Ad

Answer

You can add an observer for UIApplicationWillEnterForeground notification. And you could add some logic right before calling the facebook button, to check if the app has entered background because of that or simply because the user has pressed home button.

Ad
source: stackoverflow.com
Ad