User User - 1 year ago 107
Swift Question

Obtain bundle identifier programatically in Swift?

How can I get the bundle ID in Swift?

Objective-C version:

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

Answer Source

Try this:

let bundleID = NSBundle.mainBundle().bundleIdentifier