mirror of
https://github.com/xtool-org/xtool.git
synced 2026-11-16 20:41:53 +03:00
Add entitlementsPath to Plan
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user