Thanks @DTS Engineer for the detailed snippet. The usage of get-task-allow entitlement gave me idea for updating my previous parsing entitlement approach and I came up with this: struct MobileProvision: Codable { static let current: MobileProvision = { let profileExtension = mobileprovision guard let profilePath = Bundle.main.path(forResource: embedded, ofType: profileExtension), let profileString = try? String(contentsOfFile: profilePath, encoding: .isoLatin1), case let scanner = Scanner(string: profileString), scanner.scanUpToString(), let plist = extractedPlist.appending().data(using: .isoLatin1) else { return .simulatorDefault() } let decoder = PropertyListDecoder() do { return try decoder.decode(MobileProvision.self, from: plist) } catch { return .simulatorDefault() } }() static func simulatorDefault() -> Self { return Self(entitlements: Entitlements(isDebuggable: true, apsEnvironment: .development)) } let entitlements: Entitlements enum CodingKeys: String, CodingKey { case entitlements = Entitlements
Topic:
Developer Tools & Services
SubTopic:
General
Tags: