Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Document Types in XCode 4.2?

I have an iPhone app, and I would like it so that when a user clicks on a .pdf file as an email attachment, my App is one of the options to open it with. After some research, it seems that I need to add a Document Type in the info.plist. Problem is, I cannot find ANY tutorials explaining how to use the new Document Type GUI:

Image here:

Screenshot

Can anybody help me?

like image 405
user1007895 Avatar asked Nov 01 '11 22:11

user1007895


2 Answers

This "Document Types" editor feature may be so new (was it introduced in 4.2) that the documentation sloths haven't had time to write anything about it.

I did find this Technical Q&A document that describes "How do I get my application to show up in the 'Open in...' menu on iOS for a specific document type?", which basically introduces the Xcode developer to the Document Types editor.

And more low level documentation.

If you understand these basics and can figure out how to edit a raw Info.plist file, you should be good to go!

I hope this information helps you out.

like image 50
Michael Dautermann Avatar answered Sep 21 '22 00:09

Michael Dautermann


It looks like there's still no official documentation on this. With the help of this SO answer describing how to write the info.plist file, I came up with this in Xcode 4.5.1:

enter image description here

This set of properties seems to be the minimum to get your app to run by tapping on an email attachment.

like image 30
Rich Apodaca Avatar answered Sep 22 '22 00:09

Rich Apodaca