views:

307

answers:

2

Is there any way to find the application identifier prefix in you iPhone application programmatically? Or even just to get the entire Application Identifier string?

I see you can find it by peeking into the "embedded.mobileprovision" file, but is there an easier way? (And I don't think that works if you're running in the simulator)

EDIT: Sorry, what I mean is the identifier PREFIX (10 characters). I've realized though that I don't actually need this, because the rest of the ID is guaranteed to be unique anyway.

+1  A: 

Sure, just grab your application's Info.plist and look at the CFBundleIdentifier entry.

St3fan
+1  A: 

The bundle id is stored in the Info.plist of the app bundle as St3fan specified, but you should not grope at the Info.plist directly. Use -[[NSBundle mainBundle] bundleIdentifier] instead.

orange