0

I know I can check if a URL has been used to open my application, like so:

- (BOOL)application:(UIApplication*)application
          openURL:(NSURL*)url
sourceApplication:(NSString*)sourceApplication
       annotation:(id)annotation'

... but how do I check if the user has only returned to the app (and update my interface accordingly), without a URL being used? The use case is when logging in to Facebook or Twitter via Safari, and then user just goes back to the app instead.

cannyboy
  • 24,180
  • 40
  • 146
  • 252

1 Answers1

1

Use applicationDidBecomeActive or applicationWillEnterForeground

revolver
  • 2,385
  • 5
  • 24
  • 40
  • Is an answer starting with "I think" really an answer? – Sandro Meier Feb 06 '14 at 10:18
  • 2
    To answer Sandros Question: [Exhibit 1](http://stackoverflow.com/a/4945377/457406), [Ex. 2](http://stackoverflow.com/a/5080290/457406), [Ex. 3](http://stackoverflow.com/a/3726516/457406), [Ex. 4](http://stackoverflow.com/a/6889604/457406), [Ex. 5](http://stackoverflow.com/a/5729092/457406), [Ex. 6](http://stackoverflow.com/a/5542121/457406). Obviously it is possible to start an answer with "I think". SCNR ;-) – Matthias Bauch Feb 06 '14 at 10:32