brian
brian

Reputation: 3394

Is there a way to get the Bundle ID at runtime?

Is there a way to get the Bundle ID from Info.plist at runtime? Something like [[UIApplication sharedApplication] bundleIdentifier] would be great.

Upvotes: 20

Views: 3611

Answers (2)

christopher.online
christopher.online

Reputation: 2774

Swift 3

Bundle.main.bundleIdentifier

Upvotes: 1

brian
brian

Reputation: 3394

[[NSBundle mainBundle] bundleIdentifier]

Upvotes: 34

Related Questions