APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

iPad app file extensions

I have been using Dropbox to transfer files to my iPad. There are plenty of other options for that task, but I already use Dropbox anyway, which means that sometimes the file I want is sitting there even before I knew that I wanted it on the iPad.

(By the way, you can put iPad files into your Dropbox, but only photos and video. That's not a Dropbox fault; it's Apple that limits this.)

Once you have something in Dropbox, you can pass it to another app. That function is also somewhat limited - to get a file into another app, that app has to be "Dropbox enabled". As Dropbox has lousy text selection capabilities, you really need such an app even for simple text files.

GoodReader can handle text files but unless your file has the proper extension, Dropbox won't know that and will tell you that there is no app available for your file. I guessed the right extension, but what would you do if your guess was wrong and the developer's documentation lacked this particular piece of information?

There is an app that lets you look up the apps that belong to particular extensions, but you don't need to buy anything to find the extensions that an app you own recognizes. Your iTunes computer has what you need. On my Mac, the desired directory is under my home directory in "Music/iTunes/Mobile Applications/". There are .ipa files for all your apps; I copied the GoodReader file to a temporary directory, renamed it to end in .zip and then unzipped that.

The unzipping produces a Payload directory; within that I found GoodReader and in there I found Info.plist. That's where we'll find what we are after:


<key>CFBundleDocumentTypes</key>
        <array>
                <dict>
                        <key>CFBundleTypeName</key>
                        <string>PDF</string>
                        <key>LSHandlerRank</key>
                        <string>Alternate</string>
                        <key>LSItemContentTypes</key>
                        <array>
                                <string>com.adobe.pdf</string>
                        </array>
                </dict>
                <dict>
                        <key>CFBundleTypeName</key>
                        <string>TEXT</string>
                        <key>LSHandlerRank</key>
                        <string>Alternate</string>
..
 

Not all apps have a CFBundleDocumentTypes key - not even apps that obviously store files, like SimpleNote (which is the app I prefer for general text creation). Even though that plainly stores files somewhere, its Info.plist has no such key. It isn't Dropbox enabled anyway, so I tap the text key in GoodReader to put it in a text editing mode, which then lets me select text to copy to SimpleNote. As I mentioned, that two step process is actually easier than selecting text directly from Dropbox (or so I have found, anyway).

Much of this may change when the iPad 4.0 OS releases later this year; who knows, I might even remember to come back to update this!



Got something to add? Send me email.



2 comments



Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Anthony Lawrence







Fri Aug 5 13:05:46 2011: 9668   anonymous

gravatar


Hi

You have told about the pdf. How to open any image in the application? I mean if any image is found in the ipad (in any application), then how to allow that image to open in our application? How to modify the plist so that image can be opened in our application.

Same is the case with the webview.

Any help regarding this will be helpful.

Thank

Sumit Jain



Fri Aug 5 13:16:48 2011: 9669   TonyLawrence

gravatar


By YOUR application do you mean something you wrote or just some random app you are using?

In the first case, obviously you can do whatever you want. In the second, it's up to whoever wrote it.

------------------------
Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





The errors which arise from the absence of facts are far more numerous and more durable than those which result from unsound reasoning respecting true data. (Charles Babbage)

There is no programming language, no matter how structured, that will prevent programmers from making bad programs. (Larry Flon)







This post tagged: