I'm trying to launch the container app from the extension. (An Action extension) The container app has a working URL scheme (example://) and I can validate this by navigating to that URL in Safari.
When I try to use the -[NSExtensionContext openURL:completionHandler:] to launch the container app, I get an unsuccessful callback and nothing happens.
The iOS 8 Beta 2 changes say that the openURL method should work now, but is this still a bug or am I doing something wrong?
It worked for me in a Today Extension using this code:
NSExtensionContext *myExtension=[self extensionContext];
[myExtension openURL:[NSURL URLWithString:@"http://google.com"] completionHandler:nil];
However, it might not work in Action Extensions. From the documentation:
Each extension point determines whether to support this method, or under which conditions to support this method. In iOS 8.0, only the Today extension point supports this method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With