IOS - OpenURL from Keyboard Extension on iOS 8.3 Beta

In my project, I used WebView to open a Container application from a keyboard extension. It worked fine until I tried to run it on iOS 8.3 beta. In this new version of iOS, it’s just nothing .

I tried using NSExtensionContext and WKWebView - without any success.

Does anyone know how to openURL on a keyboard extension on iOS8.3?

thanks

+6
source share
2 answers

Can you try this snippet?

-(void)openURL:(NSString*)url{ UIResponder* responder = self; while ((responder = [responder nextResponder]) != nil) { NSLog(@"responder = %@", responder); if ([responder respondsToSelector:@selector(openURL:)] == YES) { [responder performSelector:@selector(openURL:) withObject:[NSURL URLWithString:url]]; } } } 

Quoted from http://yusukekuni.hatenablog.com/entry/2015/05/01/144050

+5
source

I have the same problem with a custom action.

As far as I know, using webview for openUrl in an extension is a workaround and is not officially supported by sdk. Apple seems to have removed it completely in iOS 8.3.

The only extension that supports openUrl is now a widget.

0
source

Source: https://habr.com/ru/post/983958/


All Articles