32 lines
1.1 KiB
Swift
32 lines
1.1 KiB
Swift
import Foundation
|
|
|
|
public enum StorageServiceIdentifiers {
|
|
public static var bundleIdentifier: String {
|
|
let identifier = Bundle.main.object(forInfoDictionaryKey: "BaseBundleID") as? String ??
|
|
Bundle.main.bundleIdentifier ??
|
|
"com.example.securestorage"
|
|
return identifier
|
|
}
|
|
|
|
private static var teamIDPrefix: String {
|
|
if let teamID = Bundle.main.object(forInfoDictionaryKey: "TeamID") as? String, !teamID.isEmpty {
|
|
return "\(teamID)."
|
|
}
|
|
return ""
|
|
}
|
|
|
|
public static var appGroupIdentifier: String {
|
|
let identifier = Bundle.main.object(forInfoDictionaryKey: "AppGroupID") as? String ??
|
|
"group.\(bundleIdentifier)"
|
|
return identifier
|
|
}
|
|
|
|
public static func logConfiguration() {
|
|
Logger.debug("--- STORAGE CONFIGURATION ---")
|
|
Logger.debug("Bundle ID: \(bundleIdentifier)")
|
|
Logger.debug("Team ID Prefix: \(teamIDPrefix)")
|
|
Logger.debug("App Group ID: \(appGroupIdentifier)")
|
|
Logger.debug("---------------------------")
|
|
}
|
|
}
|