Swift 3 and 4
Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String ?? "" Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String ?? ""
Swift 2.2
NSBundle.mainBundle().objectForInfoDictionaryKey("CFBundleName") NSBundle.mainBundle().objectForInfoDictionaryKey("CFBundleDisplayName")
Learn more about CFBundleName and CFBundleDisplayName
The following is Apple's core core documentation documentation.
CFBundleName , "Package Name", Shortened Package Name; not intended for viewing by the user. See CFBundleName for details. (Recommended, localized)
CFBundleDisplayName , " Package Display Name", user-visible package name; used by Siri and displayed on the main screen in iOS. See CFBundleDisplayName for details. (Required, Localized)
Mobile Dan 01 Sep '16 at 21:23 2016-09-01 21:23
source share