How to Get Bundle Id?

I am working on getting the facebook API working for iOS, and the FB registration page requires the Bundle ID of the project. How can I get this information? I read something about getting it at run time, but is there a way to get Xcode to tell me this information, or is it held in a plist somewhere. I am not using the default bundle id, I remember setting it while I created the project.

1

7 Answers

If you are trying to get it programmatically , you can use below line of code :

objective C

NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];

Swift 3.0 :

let bundleIdentifier =  Bundle.main.bundleIdentifier

It will work for both iOS and Mac apps Good luck..

1

For those using Xcode >=7: select your target and click the General tab. Bundle Identifier is found under Identity.

2

In Xcode 4, select your project, then your target (you should have only one) and then the 'Info' tab. You should be able to see the bundle identifier there.

2

Details

  • Xcode 11.2.1 (11B500), Swift 5.1
Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.