File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,7 +153,8 @@ public struct Planner: Sendable {
153153 bundleID: bundleID,
154154 infoPlist: infoPlist,
155155 resources: resources,
156- iconPath: self . schema. base. iconPath
156+ iconPath: self . schema. base. iconPath,
157+ entitlementsPath: self . schema. base. entitlementsPath
157158 )
158159 }
159160
@@ -217,6 +218,7 @@ public struct Plan: Sendable {
217218 public var infoPlist : [ String : any Sendable ]
218219 public var resources : [ Resource ]
219220 public var iconPath : String ?
221+ public var entitlementsPath : String ?
220222}
221223
222224public enum Resource : Codable , Sendable {
Original file line number Diff line number Diff line change @@ -42,6 +42,15 @@ public struct XcodePacker {
4242 throw StringError ( " Could not parse deployment target ' \( plan. deploymentTarget) ' " )
4343 }
4444
45+ var buildSettings : [ String : Any ] = [
46+ " PRODUCT_BUNDLE_IDENTIFIER " : plan. bundleID,
47+ " TARGETED_DEVICE_FAMILY " : families. map { " \( $0) " } . joined ( separator: " , " ) ,
48+ ]
49+
50+ if let entitlementsPath = plan. entitlementsPath {
51+ buildSettings [ " CODE_SIGN_ENTITLEMENTS " ] = fromProjectToRoot + Path( entitlementsPath)
52+ }
53+
4554 let project = Project (
4655 name: plan. product,
4756 targets: [
@@ -50,10 +59,7 @@ public struct XcodePacker {
5059 type: . application,
5160 platform: . iOS,
5261 deploymentTarget: deploymentTarget,
53- settings: Settings ( buildSettings: [
54- " PRODUCT_BUNDLE_IDENTIFIER " : plan. bundleID,
55- " TARGETED_DEVICE_FAMILY " : families. map { " \( $0) " } . joined ( separator: " , " ) ,
56- ] ) ,
62+ settings: Settings ( buildSettings: buildSettings) ,
5763 sources: [
5864 TargetSource ( path: ( fromProjectToRoot + emptyFile) . string) ,
5965 ] ,
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ struct PackOperation {
6464 )
6565 let bundle = try await packer. pack ( )
6666
67- if let entitlementsPath = schema . base . entitlementsPath {
67+ if let entitlementsPath = plan . entitlementsPath {
6868 let data = try await Data ( reading: URL ( fileURLWithPath: entitlementsPath) )
6969 let decoder = PropertyListDecoder ( )
7070 let entitlements = try decoder. decode ( Entitlements . self, from: data)
You can’t perform that action at this time.
0 commit comments