CFBundleDocumentTypes & UIFileSharingEnabled issues
Asked Answered
R

7

5

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

Roundabout answered 8/4, 2010 at 22:26 Comment(0)
E
16

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!

Erdda answered 9/4, 2010 at 14:22 Comment(2)
That is the way I had it set. I ended up creating a new project to test the flag, and that worked. Still no luck in my other project tho.Roundabout
Setting value type to "boolean" instead of string will make the output from Property List Editor (or Xcode's built-in variant of it) look the same as your first output.Midwife
S
14

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).

Siamang answered 9/5, 2010 at 15:33 Comment(0)
M
1

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!

Mola answered 14/7, 2010 at 15:45 Comment(0)
J
1

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.

Javelin answered 22/9, 2010 at 18:19 Comment(0)
F
1

It seems you also need to have CFBundleDisplayName set. This is what fixed my problem. See UIFileSharingEnabled has no effect.

Firenew answered 30/1, 2011 at 1:6 Comment(0)
A
0

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.

Ambuscade answered 12/4, 2010 at 0:16 Comment(2)
UIFileSharingEnabled, yes. But CFBundleDocumentTypes registers the app as being able to open the specified file formats with the system. Only problem is no one seems to be able to get it to work.Roundabout
I can't ask if you tried it in 4.0, because that's under NDA. But given what they publicly said, I don't expect this works in 3.2 (even though the docs imply it should).Ambuscade
D
-1

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

Danialah answered 27/6, 2010 at 0:44 Comment(3)
The debug XCode builds also work fine. (not only ad-hoc distribution versions).Fulgurite
I cannot see my debug build in iTunes though, any suggestion?Pneumococcus
This doesn't seem to be documented anywhere, but it aligns with my experience. UIFileSharingEnabled also doesn't seem to be required on TestFlight builds, only when the app is deployed through the App Store or Business Custom App. Not sure about Enterprise builds though. Additional report of this behavior: #32631374Saga

© 2022 - 2024 — McMap. All rights reserved.