From 1543eef3c185703d4140664ca7a5a61138451b7b Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sat, 25 Jun 2022 14:57:09 +0200 Subject: [PATCH] Add convenient appId constant --- Passepartout/App/Constants/Constants+App.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Passepartout/App/Constants/Constants+App.swift b/Passepartout/App/Constants/Constants+App.swift index f766e845..779ac479 100644 --- a/Passepartout/App/Constants/Constants+App.swift +++ b/Passepartout/App/Constants/Constants+App.swift @@ -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"