I have an extension for iOS8. The service uses OAuth for authentication. The login information that I use for the extension is shared with the container.
The problem is this:
When I am in the extension, the application switches to and leaves the container application, and then the application switches back to the host application containing the extension. How do I know if an extension has just appeared? The extension relies on certain information that must be present in the shared database between the container and the extension, but the data is deleted when the application exits.
I tried registering for various “application notifications” such as UIApplicationDidBecomeActiveNotification. However, as expected, they are not called for extensions.
How can I determine when the state of an extension changes so that I can make my extension more reliable when it reappears?
source share