I want to register a file type with the IOS system and have my users be able to open the file from e-mail and feed it to my titanium program. I've seen a few people ask this question, but no answers. Can this be done in titanium?
4 Answers
This can absolutely be done.
You need to add information into the apps info.plist file. The instructions are readily available via Google.
Here is an example from one of my apps that opens PDF files from an email.
<key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeIconFiles</key> <array> <string>Icon.png</string> </array> <key>CFBundleTypeName</key> <string>Open PDF in AppName</string> <key>CFBundleTypeRole</key> <string>Viewer</string> <key>LSHandlerRank</key> <string>Alternate</string> <key>LSItemContentTypes</key> <array> <string>com.adobe.pdf</string> </array> </dict> </array>
Thanks Tim! I'll check this out. Where does the file go once you "open" it in your titanium app?
I need to do the inverse operation: I want to create a button (or menu) in my app that check if adobe reader is installed and open the document in adobe reader. I need to check which applications have registered the com.adobe.pdf key in CFBundleDocumentTypes. Is it possible in titanium?
There is a module in the market place that allows you to provide the "open in" menu functionality in your app. It is called DocumentViewer for iPhone.
Check it out ... I think it will do what you need.
Your Answer
Think you can help? Login to answer this question!