来自App Extension的openURL [英] openURL from App Extension
本文介绍了来自App Extension的openURL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在iOS 8 beta 2上,应该可以使用app扩展中的openUrl写入发行说明:
On iOS 8 beta 2 it should be possible to use openUrl from app extension as written into the release notes:
然而当我尝试使用此API时(在Xcode 6 beta 2上)我收到以下错误:
however when I try to use this API (on Xcode 6 beta 2) I get the following error:
Beta 2是否真的解决了这个问题?
Beta 2 really fixed this issue or not?
推荐答案
你可以使用这段代码:
[self.extensionContext openURL:url completionHandler:^(BOOL success) {
NSLog(@"fun=%s after completion. success=%d", __func__, success);
}];
API文件:
openURL:completionHandler:
你也可以参考这个问题:
openURL在Action Extension中无效
you could also refer to this question: openURL not work in Action Extension
这篇关于来自App Extension的openURL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文