Created
January 18, 2021 14:55
-
-
Save mohsinbmwm3/fa58ca3cc0f4ca56ceac9bf84f6d989e to your computer and use it in GitHub Desktop.
Bundle extensions in swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
extension Bundle { | |
var appName: String? { | |
return Bundle.main.infoDictionary?["CFBundleName"] as? String | |
} | |
var appVersion: String? { | |
return Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String | |
} | |
var bundleVersion: String? { | |
return Bundle.main.infoDictionary?["CFBundleVersion"] as? String | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment