简体   繁体   English

对于iOS开发人员,对于给定的文件类型,我的应用程序可能如何知道,哪个其他应用程序可以打开它

[英]for iOS dev, how my app might know, for a given file type, which other app could open it

in iOS devices, the Mail app offers "Open In..." option for attachments. 在iOS设备中,邮件应用程序为附件提供“打开方式...”选项。 The apps listed have registered their CFBundleDocumentTypes with the OS. 列出的应用已在操作系统中注册了CFBundleDocumentTypes。 What I am wondering is how my app might know, for a given file type, which other app could open it ? 我想知道的是,对于给定的文件类型,我的应用程序可能如何知道哪个其他应用程序可以打开它?

There is no public API for this, however, you can open the sheet that Mail.app shows using the UIDocumentInteractionController class. 没有公共API,但是,您可以使用UIDocumentInteractionController类打开Mail.app显示的工作UIDocumentInteractionController It doesn't give you access to the names of the Apps that can handle the document, but its probably better than nothing. 它不能让您访问可以处理文档的应用程序的名称,但是它总比没有好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何知道哪个用户登录了我的ios应用 - how to know which user has logged in to my ios app 当我的应用程序处于后台时,将其他应用程序的文件/内容打开到我自己的iOS应用程序中 - Open file / content of other app into my own iOS app, when my app was in background 有没有办法知道哪个应用程序打开了我的 iOS 应用程序? - Is there a way to know which app opened my iOS app? 如何知道我的应用目前是否在ios中使用 - How to know if my app is currently used in ios iOS:使用UIDocumentInteractionController打开文件,并知道哪个应用程序打开了文件 - iOS: open file with UIDocumentInteractionController and know what app opened the file 我如何知道我的iOS应用程序是在设备上还是在其他设备上运行? - How can I know if my iOS App is running on my device or in any other? iOS-在我的应用程序中打开后复制文件 - iOS - copy file after open in my app iOS,如何知道在iOS Appstore中使用哪个帐户购买应用程序? - iOS , How to know which account was used to buy app in ios appstore? 我怎么知道哪一行代码导致我的iOS应用程序在Xcode 9中崩溃 - How do I know which line of code has caused my iOS app to crash in Xcode 9 Facebook iOS应用程序-如何了解授权我的Facebook应用程序的用户 - Facebook iOS app - How to know the users that authorize my Facebook app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM