CFBundleDocumentTypes & UIFileSharingEnabled issue

2020-02-24 04:40发布

Has anyone gotten UIFileSharingEnabled or CFBundleDocumentTypes to work? I added UIFileSharingEnabled as true to my plist and used Apple's example from the link below for CFBundleDocumentTypes, but can't seem to get it to work.

I don't see my app under file sharing in iTunes, and I do not get the option to open documents I registered in my app when I click on them in the mail.app

http://developer.apple.com/iphone/library/documentation/General/Conceptual/iPadProgrammingGuide/CoreApplication/CoreApplication.html

7条回答
你好瞎i
2楼-- · 2020-02-24 04:45

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!

查看更多
孤傲高冷的网名
3楼-- · 2020-02-24 04:48

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.

查看更多
倾城 Initia
4楼-- · 2020-02-24 04:54

I don't know if UIFileSharingEnabled works the way you think it does. Apple is mentioning opening documents from Mail as a 4.0 feature. Setting it should mean your app shows up in the file section of iTunes.

查看更多
5楼-- · 2020-02-24 05:00

Carloe,

Open your app-info.plist as a text file. The UIFileSharingEnabled setting should look like this:

<key>UIFileSharingEnabled</key>
<true/>

If you did what I did and added UIFileSharingEnabled in the plist and set its value to YES, your key will look like this:

<key>UIFileSharingEnabled</key>
<string>YES</string>

After I fixed that key, my app popped right up in the File Sharing section under the Apps tab of iTunes.

Hope that fixes your problem too!

查看更多
兄弟一词,经得起流年.
6楼-- · 2020-02-24 05:00

File sharing does work on 3.2, but there is a little bug, you have to remove the application after adding UIFileSharingEnabled to the plist in order to get itunes to refresh and see that the app now supports file sharing (rebooting/disconnecting does not do it).

查看更多
The star\"
7楼-- · 2020-02-24 05:00

UIFileSharingEnabled affects only when your app is built as 'distribution'. If you build ad-hoc version and install it, you can check your program.

查看更多
登录 后发表回答