iOS (and Android) - register to open certain file-types?

Ben Rubinstein benr_mc at cogapp.com
Mon Nov 5 13:01:01 EST 2012


On 02/11/2012 20:40, Monte Goulding wrote:
> Refer to this for the plist changes you need to make:
> http://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1
>
> To edit the plist you need to find it inside the LiveCode app bundle.

Thanks Monte, that works.

For the benefit of future thread-readers, some tips it took me a while to 
figure out:

a) The above linked doc from apple refers to adding a CFBundleDocumentTypes 
array to your plist.   In the plist for a MacOS application, a 
CFBundleDocumentTypes array can include CFBundleTypeExtensions array listing 
file extensions.  However, using that same array in the iOS plist doesn't 
work.  Instead, you need to add a UTExportedTypeDeclarations array to the 
plist, which links file extensions to UTTypeIdentifiers; then you can add the 
CFBundleDocumentTypes array with a CFBundleTypeName referencing the 
UTTypeIdentifier.

b) If you do all that - then the other bit you need to know is to handle the 
"urlWakeUp" message - that's where your iOS app will get the file reference. 
Fortunately, Monte introduced me to that message just a couple of days ago on 
a separate thread!

Ben




More information about the use-livecode mailing list