Q:

Finding App Id under .ipa or .app

I'm building an application that search and recognizes any iPhone apps that user has in his/her computer. I would like to know a way to "extract" the id of the application from the .ipa file.
I was trying to do the recognition using only the App File Name, but I discovered that the File Name is not the name of the app in Apple Store.
Live Poker 6K Free by Zynga != Live Poker 3.7.ipa
The id i'm talking about is the app id, like in,
http://itunes.apple.com/app/live-poker-6k-free-by-zynga/id354901953?mt=8
the id is 354901953.
Does any body has a clue how can I manage to find this information?

A:

An IPA is just a ZIP archive. When you unzip it you'll find an iTunesMetadata.plist or Info.plist which should contain all info you need.

A:

If the app is not distributed via iTunes, i.e. it is an enterprise distribution or ad-hoc, you can find the bundle seed ID in the embedded.mobileprovision file. It's a binary, but you can read it in the terminal with 
cat embedded.mobileprovision
You should see a line that says <BUNDLE SEED ID>.com.yourcompanyname.*

