有没有人让 UIFileSharingEnabled 或 CFBundleDocumentTypes 工作?我将 UIFileSharingEnabled 作为 true 添加到我的 plist 中,并使用下面链接中的 Apple 示例作为 CFBundleDocumentTypes,但似乎无法使其正常工作。
我在 iTunes 的文件共享下看不到我的应用程序,当我在 mail.app 中单击它们时,我没有打开我在应用程序中注册的文档的选项
有没有人让 UIFileSharingEnabled 或 CFBundleDocumentTypes 工作?我将 UIFileSharingEnabled 作为 true 添加到我的 plist 中,并使用下面链接中的 Apple 示例作为 CFBundleDocumentTypes,但似乎无法使其正常工作。
我在 iTunes 的文件共享下看不到我的应用程序,当我在 mail.app 中单击它们时,我没有打开我在应用程序中注册的文档的选项
卡洛,
以文本文件的形式打开您的 app-info.plist。UIFileSharingEnabled 设置应如下所示:
<key>UIFileSharingEnabled</key>
<true/>
如果您按照我的做法在 plist 中添加 UIFileSharingEnabled 并将其值设置为 YES,您的密钥将如下所示:
<key>UIFileSharingEnabled</key>
<string>YES</string>
修复该密钥后,我的应用程序立即在 iTunes 应用程序选项卡下的文件共享部分弹出。
希望也能解决您的问题!
文件共享在 3.2 上确实可以工作,但是有一个小错误,您必须在将 UIFileSharingEnabled 添加到 plist 后删除应用程序才能让 iTunes 刷新并看到该应用程序现在支持文件共享(重新启动/断开连接不这样做) )。
I can confirm what valexa said: UIFileSharingEnabled started working as soon as I had removed the app from the device. Building & running it on the device afterwards made iTunes recognize the app in the file sharing section of iTunes. So, an ad-hoc or any other 'distribution' build is definitely not needed. HTH!
I also confirm Valexa's idea. I use default .plist which shows
<key>UIFileSharingEnabled</key>
<true/>
After Removing/Installing several times, iTunes successfully recognized the File Sharing feature with my app.
It seems you also need to have CFBundleDisplayName set. This is what fixed my problem. See UIFileSharingEnabled has no effect.
我不知道 UIFileSharingEnabled 是否像您认为的那样工作。Apple 提到从 Mail 中打开文档是 4.0 的一项功能。设置它应该意味着您的应用程序显示在 iTunes 的文件部分。
UIFileSharingEnabled 仅在您的应用程序构建为“分发”时才会影响。如果您构建 ad-hoc 版本并安装它,您可以检查您的程序。