I want to launch my containing app.
I tried using URL schemes.
The URL scheme launched the app from other places - so the problem is not there.
Looks like this object is nil:
self.extensionContext
thus i can't run this method:
[self.extensionContext openURL:url completionHandler:nil];
Can I launch my app? Do URL Schemes work in a custom keyboard?
thanks!
Try this code
I struggled with this for a couple of days. I could not get the UIWebView working inside the custom keyboard.
Fix: put it inside the viewDidAppear:animated instead of viewDidLoad (on another note this is where the code for the keyboard's custom height should stay as well).
Code:
Apple does not allow any app extensions other than Today extensions to open the containing app.
From the guidelines:
You can check Here
I tried to do above solutions for latest xcode 8.2 and swift 3.0.
Unfortunately. I can't get it work. So I found my own solution and it works well in swift 3.0, xcode 8.2
This is what I found to open any URL using what has been described above:
Please note that in this case I am instantiating this call from the UIInputViewController.
This method should also work using the URL scheme from the containing app
NOTE: As of iOS 8.3 Apple has killed this method