Five "under-the-hood" things you should know about App Store apps

Here's a Q&A detailing 5 things you should definitely know.


Ted Landau

September 2008

The App Store is no doubt one of the best things to have happened to the iPhone (and the iPod touch). Users are happily adding a wide array of apps to their devices, usually with little or no difficulty. Still, occasionally things go wrong. At such times, beyond the standard troubleshooting advice you'll find here at MacFixIt, it pays to know at least a bit about what's going on "under-the hood." Here's a Q&A detailing 5 things you should definitely know:

1. Where are iPhone apps actually stored on a Mac?

When you click the Applications item under Library in the iTunes sidebar, a display appears that contains icons for every app on your drive (even ones not currently installed on your iPhone or iPod touch).

From the Finder, you'll find these apps stored in the ~/Music/iTunes/Mobile Applications folder. The only apps you won't find are ones that you downloaded directly on your iPhone but have not yet synced to your Mac. They'll wind up in the folder after your next sync -- assuming you click the Transfer button when the dialog pops up asking about "purchased items...that are not present in your iTunes library."

2. I opened the Mobile Applications folder. All the files there end in .ipa. What's with that?

Consider ipa an abbreviation for "iPhone application." As with virtually all Mac OS X applications (yes, even the iPhone runs a version of Mac OS X), applications are actually packages (special folders designed to appear as files in the Finder). As such, you can peek inside a .ipa item and view its contents. However, the .ipa item is a flat package (a topic I covered in a previous column); this means that you won't be able to open it via the typical method of selecting Show Package Contents from the item's contextual menu. Instead, use the shareware program Pacifist. Specifically:

  1. Make a copy of the app that you want to check (say Koi Pond.ipa).
  2. Change the name of the copied file to Koi Pond.ipa.pkg.
  3. Click "Use .pkg" when the dialog appears asking what you want to do.
  4. Open Koi Pond.ipa.pkg in Pacifist.

Granted, there's not much you are likely to want to do here. But you never know. As one example, do the following:

  1. Via Pacifist, navigate to Payload > >Info.plist. Extract this file.
  2. Open the file using Property List Editor (or any other utility you have for opening .plist files).

From here, you can confirm the version number (CFBundleVersion) of the app. This should be the same number you'll find in the Version item of the Summary tab, if you select Get Info for an app in iTunes.

Also in the .plist file, note the line that reads UIStatusBarHidden Boolean Yes. This setting is why you don't see the status bar at the top of the screen when running Koi Pond. Just for fun, you could change Yes to No to bring the Status Bar back (see the final item below for more details).

3. There are several copies of some apps in the Mobile Applications folder (with names like Koi Pond.ipa, Koi Pond 1.ipa, Koi Pond 2.ipa etc.) What gives with that?

First the good news: If you've updated to iTunes 8, this should no longer happen.

Prior to iTunes 8, these duplicates accumulated each time you updated to a newer version of an app (or even redownloaded the same version). All downloads were retained, even though only the latest copy was used.

Starting in iTunes 8, the older version is moved to the Trash, leaving just the newest version in the Mobile Applications folder. As a bonus, the ipa file now includes the version number in its name (such as Koi Pond 2.1.ipa).

If you still have duplicates hanging around, drag them to the Trash and delete them. You only need to retain the copy with the most recent modification date. If there is any doubt as to which copy to keep, go to Applications in iTunes and select Show in Finder from any app's contextual menu. This will take you to the Mobile Applications folder with the active copy highlighted. That's the one you want to keep.

Although they are usually harmless, these duplicates can occasionally cause problems. See my Macworld article for one example; it describes a problem that cropped up after an app changed its name (from Box Office to Now Playing).

4. Can I run apps on my iPhone that other people have purchased?

No and Yes. The system for apps works the same way as for music and video purchased from the iTunes Store. By default, App Store apps can only be run on iPhones and iPod touches synced to the computer used to purchase the software. However, a user can authorize up to 5 computers to have access to their iTunes Store purchases. Thus, to use an app purchased by a friend:

  1. First, select Authorize Computer from iTunes' Store menu on your Mac and enter your friend's iTunes Store account name and password (or have him do it).
  2. Copy the desired .ipa item from his computer to yours, by whatever method you prefer. Don't place it in your Mobile Applications folder. Leave it on your Desktop.
  3. Launch iTunes and select Applications from the sidebar.
  4. Drag the app item from the Desktop to the Applications display. The app's icon should now appear in the display. A copy of the .ipa item is also placed in your Mobile Applications folder.
  5. Sync your iPhone. The new app should be added to your device.

    There may be other ways to accomplish this, but this method worked for me. If you ever lose track of who purchased a given app in your Library, select Get Info for the app. The Summary tab lists the purchase information.

    5. What about on the iPhone itself? Is there an equivalent to the Mobile Applications folder? And can I access it?

    Yes, there is an equivalent folder and you can access it. But only if you jailbreak your iPhone or iPod touch. Otherwise, the iPhone OS software effectively keeps you out.

    Assuming you are willing to take the risk, you can use PwnageTool or QuickPwn to jailbreak iPhones or iPod touches running even the latest iPhone 2.1 Updates. For example, I had no trouble jailbreaking my iPod touch with QuickPwn.

    After jailbreaking, then what? There are utilities you can download to your jailbroken iPhone that allow you to explore the device. Other utilities give your iPhone the capability to mount as an external drive on a Mac. However, there's a simple solution that requires no additional iPhone software nor any settings changes: simply use DiskAid on your Mac. Here's how it works:

    1. With your iPhone or iPod touch connected, launch Disk Aid. Select Root Folder from the pop-up menu in the lower left (this option is not selectable unless you have jailbroken your device). When you are warned about the risks of doing this, tell DiskAid to Go Ahead.
    2. Once you are at the root folder, navigate to /User/Applications. Alternatively, navigate to /var/mobile/Applications. Both paths wind up at the exact same location.
      [Note: the iPhone's pre-installed apps are separately stored in the /Applications folder.]
    3. Here you will find folders representing every app you've downloaded from the App Store. Their names will be an indecipherable bunch of hex code. If you click on any folder to view its contents, however, you'll see the actual name of the app (as seen for in Figure 1).

    Figure 1. DiskAid drills into the Root Folder of an iPod touch to the Koi Pond app

    Should you want to do so, you could check any app's Info.plist file (as described above) to confirm that the version of the app installed on your iPhone is indeed the same as the one in your iTunes Library.

    If you are a bit more daring, you can modify these files (you might want to save a backup of the unmodified file first, just in case!). This avoids having to sync your iPhone to install a modified copy of an app. However, any modifications made this way will likely be overwritten the next time the app is updated and synced. As a proof of concept, here's how I changed Koi Pond:

    1. After copying Koi Pond's Info.plist file from my iPod touch to my Mac, I opened the file in Property List Editor.
    2. I changed the value of the UIStatusBarHidden item from Yes to No and saved the file.
    3. I copied the file back to the touch, simply by dragging the file back to the folder displayed in DiskAid.
    4. I powered down the touch and restarted it.

    Sure enough, the Status Bar was now present in Koi Pond (as seen in Figure 2).

    Figure 2. Koi Pond after the modification to display the Status Bar.

  1. More from Mac Musings
  2. Close
    Autoplay: ON Autoplay: OFF