How to get bundle ID?

5 Solutions Collect From Internet About “How to get bundle ID?”

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

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.

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..

You can find out and change from supporting file=> info.plist => Bundle identifier

It is generally DNS form ex. com.companyname.appname

enter image description here

If you’re build a library, this may be problematic – it’s applications that have a bundle ID. However, your can probably query this programatically using [NSBundle mainBundle] and then [NSBundle bundleIdentifier]