Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// Provides convenience accesors to some info dictionary keys
- extension Bundle {
- var identifier: String? {
- return string(forInfoDictionaryKey: "CFBundleIdentifier")
- }
- var displayName: String? {
- return string(forInfoDictionaryKey: "CFBundleDisplayName")
- }
- var shortVersionString: String? {
- return string(forInfoDictionaryKey: "CFBundleShortVersionString")
- }
- var version: String? {
- return string(forInfoDictionaryKey: "CFBundleVersion")
- }
- func string(forInfoDictionaryKey key: String) -> String? {
- return object(forInfoDictionaryKey: key) as? String
- }
- }
Add Comment
Please, Sign In to add comment