对应应用程序:openURL:sourceApplication:annotation: [英] Counterpart to -application:openURL:sourceApplication:annotation:

查看:367
本文介绍了对应应用程序: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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆