如何在 iPhone 上支持外部 UTI
我已经为我一直在开发的一个应用程序为此工作了一段时间。该应用程序能够打开来自其他应用程序的不同文件,例如邮件。我可以在 iPad 上使用它,但我也需要它在 iPhone 上使用。然而,我在 iPhone 上测试它时遇到了问题,因为应用程序的 info.plist 文件的 UTExportedTypeDeclarations 部分中的导出文件扩展名无法在 iPhone 上的邮件中触及。
这是我在 UTExportedTypeDeclarations 部分中的内容:
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>com.myapp.ext</string>
<key>UTTypeDescription</key>
<string>Generic</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
<string>public.content</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>ext</string>
</array>
</dict>
</dict>
</array>
我在相应的 CFBundleDocumentTypes 中也有此内容:
<dict>
<key>CFBundleTypeName</key>
<string>Generic</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.myapp.ext</string>
</array>
</dict>
总之,它不是在 iPhone 上读取 .ext 文件扩展名,而是在 iPad 上读取。 任何帮助将不胜感激。
谢谢
I have been working on this for awhile for an app that I have been working on. The app is able to open up different files from other apps like mail for example. I have it working on the iPad but I need it to work on the iPhone as well. I ran into a problem with testing it on the iPhone, however, because the exported file extensions that I have in the UTExportedTypeDeclarations section in the info.plist file of the app are not able to be touched in mail on the iPhone.
Here is what I have in the UTExportedTypeDeclarations section:
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>com.myapp.ext</string>
<key>UTTypeDescription</key>
<string>Generic</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
<string>public.content</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>ext</string>
</array>
</dict>
</dict>
</array>
I also have this in this in the corresponding CFBundleDocumentTypes :
<dict>
<key>CFBundleTypeName</key>
<string>Generic</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.myapp.ext</string>
</array>
</dict>
In conclusion it is not reading the .ext file extension on the iPhone but it is on the iPad.
Any help would be much appreciated.
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论