Created
June 6, 2022 07:18
-
-
Save Shilo/ab05525cb632283386b7a0dff4cba91d to your computer and use it in GitHub Desktop.
Swift extension for getting app info.
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
// | |
// Bundle+Addition.swift | |
// | |
// | |
// Created by Shilo White on 6/3/22. | |
// | |
import Foundation | |
extension Bundle { | |
var displayName: String? { | |
return object(forInfoDictionaryKey: "CFBundleDisplayName") as? String ?? | |
object(forInfoDictionaryKey: "CFBundleName") as? String | |
} | |
var appVersion: String? { | |
return object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment