Question

I want to test opening files from other apps in my own app. I have figured out how to add CFBundleDocumentTypes in Info.plist, and it works fine on my device. But I'm wondering if it's possible to test this out on the simulator. It doesn't seem to work right now, when I open a PDF from Mobile Safari, it shows an option to "Open in MyApp" in the toolbar, but it's grey and tapping it doesn't do anything. The same file works fine on the device. Is it not possible to test CFBundleDocumentTypes on the simulator? If there's a clever way to do this, would love to know. Thanks.

Was it helpful?

Solution

Turns out, you can download the DocInteraction sample code, and run it in the simulator. It gives you a few documents you can use "Open In" with. But it sometimes gets stuck, so you have to kill the app, then wait a minute before restarting it, to get it to work again.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top