user973984 user973984 - 3 months ago 26
iOS Question

Obtain Bundle Identifier programmatically

How can I obtain a string of the Bundle Identifier programmatically from within my App?

Answer

Objective-C

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

Swift

let bundleIdentifier = NSBundle.mainBundle().bundleIdentifier