通过handleOpenURL将p12身份作为电子邮件附件导入应用程序
我的应用程序从 p12 文件导入身份,以验证对服务器的请求。
这是通过与 iTunes 进行文档交换并从文件系统加载文件来实现的。
使用我自己的文件扩展名重命名 p12 文件也可以很好地通过电子邮件导入文件。
我的问题是,是否可以注册 p12 文件扩展名,这样就不再需要重命名文件了。可以注册通用文件扩展名。以下是 Apple 提供的 UTI 列表:http://developer.apple.com/library/ios/#documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html
不幸的是,列表中缺少 p12。有人能够实现这一点吗?或者有人知道 p12 文件的 UTI 标识符吗?
顺便说一句:将 p12 导出为自己的文件扩展名不起作用。
My application imports an identity from a p12 file for authenticating requests to a server.
This is working by document exchange with iTunes and loading the file from the filesystem.
Renaming the p12 file with my own filename extension is also working fine to import the file via email.
My question is, if it is possible to register for the p12 filename extension so renaming the file is not necessary any more. Registering for general file extensions is possible. Here is a list for the UTIs available by Apple: http://developer.apple.com/library/ios/#documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html
Unfortunately p12 is missing in the list. Was anyone able to achieve this or does anyone know the UTI identifier for p12 files?
By the way: Exporting p12 as own file extension does not work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用以下代码找到 UTI:
结果将是:
com.rsa.pkcs-12
我尝试使用此 UTI 注册为查看器,但似乎 Apple 不希望除他们之外的任何人都能够处理 *.p12 的打开。邮件不允许“打开方式” - 它会在“设置”中打开 p12。我尝试从另一个应用程序通过“打开方式”打开 p12,但这也不起作用,尽管如此,我已经在应用程序的 plist 中注册了 p12 UTI。
You can find UTI using this code:
The result will be:
com.rsa.pkcs-12
I tried to use this UTI to register as viewer, but it seems like Apple doesn't want anyone except them to be able to handle open of *.p12. Mail doesn't allow "Open In" - it opens p12 in Settings. I tried to open p12 via "Open In" from another application and that doesn't work too, nevertheless I've registered p12 UTI in my application's plist.