从我的应用程序打开 iBooks
我的应用程序中有一些 PDF。我想提供一个选项,可以在设备上可能安装的其他第三方电子阅读器应用程序(例如 Stanza 和 iBooks)中打开这些 PDF。 Dropbox 应用程序已成功实现此功能,但我找不到任何有关如何检测设备上可用的其他电子阅读器或这些应用程序的自定义 URL 方案的信息。任何帮助将不胜感激。提前谢谢你们。
I have some PDF in my app. I want to provide an option to open those PDF in other third party e-readers app that might be installed on the device, like Stanza and iBooks. Dropbox application has successfully implemented this feature and I can't find any information on how to detect what other e-readers are available on the device or what the custom url scheme is for those apps. Any help would be greatly appreciated. thanks in advance guys.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
电子书
iBooks
首先,您需要创建一个 NSURL 对象,如下所示:
需要实现以下委托方法:
First of all you will need to create a NSURL object like so:
The following delegate methods will need to be implemented:
您不需要检测其他应用程序,您需要知道可以打开它们的网址。
像这样的调用:
告诉手机在任何处理 http/html 请求的应用程序(即 safari)中打开页面。
iBooks 有自己的 url 格式,希望您能找到。
注意:这是不正确的,只是为了说明不同的 url 方案。
You don't need to detect the other apps, you need to know the url that can open them.
A call like this:
Tells the phone to open the page in whatever app handles http/html requests which is safari.
iBooks has their own url format which hopefully you can track down.
NOTE: that's not correct, just meant to illustrate a different url scheme.