From 224942f5b183356bdd353f0aafa5149a4337553d Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 24 May 2025 02:13:24 +0530 Subject: [PATCH] Add entitlementsPath to Plan --- Sources/PackLib/Planner.swift | 4 +++- Sources/XToolSupport/DevCommand.swift | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/PackLib/Planner.swift b/Sources/PackLib/Planner.swift index ccfdb598..72dc2f9c 100644 --- a/Sources/PackLib/Planner.swift +++ b/Sources/PackLib/Planner.swift @@ -153,7 +153,8 @@ public struct Planner: Sendable { bundleID: bundleID, infoPlist: infoPlist, resources: resources, - iconPath: self.schema.base.iconPath + iconPath: self.schema.base.iconPath, + entitlementsPath: self.schema.base.entitlementsPath, ) } @@ -217,6 +218,7 @@ public struct Plan: Sendable { public var infoPlist: [String: any Sendable] public var resources: [Resource] public var iconPath: String? + public var entitlementsPath: String? } public enum Resource: Codable, Sendable { diff --git a/Sources/XToolSupport/DevCommand.swift b/Sources/XToolSupport/DevCommand.swift index f5e4cf53..4a8c685d 100644 --- a/Sources/XToolSupport/DevCommand.swift +++ b/Sources/XToolSupport/DevCommand.swift @@ -64,7 +64,7 @@ struct PackOperation { ) let bundle = try await packer.pack() - if let entitlementsPath = schema.base.entitlementsPath { + if let entitlementsPath = plan.entitlementsPath { let data = try await Data(reading: URL(fileURLWithPath: entitlementsPath)) let decoder = PropertyListDecoder() let entitlements = try decoder.decode(Entitlements.self, from: data)