User User - 6 months ago 34
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

Try this:

let bundleID = NSBundle.mainBundle().bundleIdentifier