user973984 user973984 - 11 months ago 89
iOS Question

Obtain Bundle Identifier programmatically

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

Answer Source

Objective-C

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

Swift

let bundleIdentifier = NSBundle.mainBundle().bundleIdentifier