iosswiftios8-share-extension

How to open iOS app from within extension?


My app is registered for URL Schemes:

enter image description here

But I have no idea how to open that app, since I cannot use UIApplication.sharedApplication() in extension. Is it possible at all?


Solution

  • Apple's documentation says:

    A Today widget (and no other app extension type) can ask the system to open its containing app by calling the openURL:completionHandler: method of the NSExtensionContext class.