对应应用程序:openURL:sourceApplication:annotation: [英] Counterpart to -application:openURL:sourceApplication:annotation:
问题描述
iOS SDK 4.2包含一个新的 UIApplicationDelegate
方法,名为application:openURL:sourceApplication:annotation:
。它是 application:handleOpenURL:
的替代,并提供了关于调用应用程序的更多信息:不仅我们获得调用应用程序的bundle标识符,而且在注释
参数
由源应用程序提供的属性列表对象
很好,这应该为多个第三方应用之间更直接的互动提供了很多机会! / p>
唯一的问题是:如何在调用应用程序一侧调用此机制? - [UIApplication openURL:]
似乎没有改变,并且不提供任何方式与URL一起传递属性列表。你需要使用新的文档交互类,你需要使用新的文档交互类,你需要使用新的文档交互类,具体来说,您可以通过 UIDocumentInteractionController
的注释
属性发送此数据。另请参阅:
iOS SDK 4.2 includes a new UIApplicationDelegate
method called application:openURL:sourceApplication:annotation:
. It is a replacement for application:handleOpenURL:
and offers more information about the calling application: not only do we get the bundle identifier of the calling app, but also, in the annotation
argument,
A property-list object supplied by the source application to communicate information to the receiving application.
Great, this should offer a lot of opportunities for a more direct interaction between multiple third-party apps!
The only problem is: how do I invoke this mechanism on the side of the calling app? -[UIApplication openURL:]
seems unchanged and does not offer any way to pass a property list along with the URL. Do you know how a calling app could do that with iOS SDK 4.2?
You need to use the new Document Interaction classes, specifically you can send this data via the annotation
property of UIDocumentInteractionController
. See also:
这篇关于对应应用程序:openURL:sourceApplication:annotation:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!