mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
23 lines
593 B
Swift
23 lines
593 B
Swift
|
import Foundation
|
||
|
|
||
|
private struct InfoPlistConstants {
|
||
|
static let versionNumber = "CFBundleShortVersionString"
|
||
|
static let buildNumber = "CFBundleVersion"
|
||
|
}
|
||
|
|
||
|
extension Bundle {
|
||
|
public var appMarketingVersion: String {
|
||
|
guard let result = infoDictionary?[InfoPlistConstants.versionNumber] as? String else {
|
||
|
return "⚠️"
|
||
|
}
|
||
|
return result
|
||
|
}
|
||
|
|
||
|
public var appBuildVersion: String {
|
||
|
guard let result = infoDictionary?[InfoPlistConstants.buildNumber] as? String else {
|
||
|
return "⚠️"
|
||
|
}
|
||
|
return result
|
||
|
}
|
||
|
}
|