SecureStorageSample/localPackages/SharedPackage/Sources/SharedKit/Constants/StorageServiceIdentifiers.swift
Matt Bruce f136869171 removed extra string keychain samples locations
Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
2026-01-21 08:27:35 -06:00

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("---------------------------")
}
}