Can you dynamically assign CFBundleDocumentTypes (with private API?)

262 views Asked by At

I'm trying to add additional 'Open In' feature to an existing app. I found a way to add the necessary CFBundleDocumentTypes to the Info.plist within the application bundle. Now my only problem is having the iOS register this key to allow 'Open In' from other apps. I assumed after a reboot iOS would check all installed app's Info.plist files and register CFBundleDocumentTypes on load. This is not the case. It seems if I create an IPA with the edited Info.plist & install it on my device, 'Open In' is registered automatically throughout the iOS.

I've read here with not much help. Can you dynamically assign CFBundleDocumentTypes to your Cocoa application?

I checked in the /var/mobile/Library/Caches/com.mobile.installation.plist I noticed that some keys that are in the Info.plist are in the com.mobile.installation.plist

For instance; UIDeviceFamily, UIBackgroundModes, UIRequiredDeviceCapibilities but no CFBundleDocumentTypes

Does anyone know where else I could look? There has gotta be way to do this with private frameworks. (Since this is for jailbroken development)

1

There are 1 answers

0
CokePokes On

Alright, I found a bit of a hack to reload the CFBundleDocumentTypes

If you can get access, delete the file:

/var/mobile/Library/Caches/com.apple.LaunchServices-054.csstore 

Then tell the user to reboot, if a respring is done instead you'll have delete the file & reboot again. (Since the com.apple.LaunchServices-054.csstore file returns after a respring.)

Hope this helps someone in the Jailbreak community if they manage to stumble across.

Note, I think this method only works on iOS7. :(