Add convenient appId constant

This commit is contained in:
Davide De Rosa 2022-06-25 14:57:09 +02:00
parent b966826f19
commit 1543eef3c1
1 changed files with 7 additions and 0 deletions

View File

@ -33,6 +33,13 @@ extension Constants {
extension Constants {
enum App {
static var appId: String {
guard let identifier = Bundle.main.infoDictionary?[kCFBundleIdentifierKey as String] as? String else {
fatalError("Missing kCFBundleIdentifierKey from Info.plist")
}
return identifier
}
static let appStoreId = bundleConfig?["appstore_id"] as? String ?? "DUMMY_appstore_id"
static let appGroupId = bundleConfig?["group_id"] as? String ?? "DUMMY_group_id"