You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Hardened Runtime sub options to work with build settings. (#342)
* Update Hardened Runtime suboptions to work with build settings.
* Fixes test, CodeSignTaskConstructionTests.appSandboxEntitlementAndBuildSettingConflictEmitsExpectedDiagnostics
/// Construct a task to create the entitlements (`.xcent`) file.
25
55
/// - parameter cbc: The command build context. This includes the input file to process (until <rdar://problem/29117572> is fixed), and the output file in the product to which write the contents.
26
56
/// - parameter delegate: The task generation delegate.
@@ -88,22 +118,14 @@ public final class ProductPackagingToolSpec : GenericCommandLineToolSpec, SpecId
88
118
89
119
// rdar://142845111 (Turn on `AppSandboxConflictingValuesEmitsWarning` by default)
// This is when build setting is true and entitlement is false
234
-
message ="The \(appSandboxBuildSettingName) build setting is set to YES, but is set to NO in your entitlements file."
228
+
message ="The '\(buildSettingName)' build setting is set to '\(buildSettingValue)', but entitlement '\(entitlement)' is set to '\(entitlementValue ?"YES":"NO")' in your entitlements file."
235
229
childDiagnostics =[
236
-
.init(behavior:.note, location:.unknown, data:.init("To enable App Sandbox, remove the entitlement from your entitlements file.")),
237
-
.init(behavior:.note, location:.unknown, data:.init("To disable App Sandbox, remove the entitlement from your entitlements file, and set the \(appSandboxBuildSettingName) build setting to NO."))
230
+
.init(behavior:.note, location:entitlementsLocation, data:.init("To enable '\(buildSettingName)', remove the entitlement from your entitlements file.")),
231
+
.init(behavior:.note, location:.buildSettings(names:[buildSettingName]), data:.init("To disable '\(buildSettingName)', remove the entitlement from your entitlements file and disable '\(buildSettingName)' in build settings."))
238
232
]
239
233
}else{
240
-
message ="The \(appSandboxBuildSettingName) build setting is set to NO, but is set to YES in your entitlements file."
234
+
message ="The '\(buildSettingName)' build setting is set to '\(buildSettingValue)', but entitlement '\(entitlement)' is set to '\(entitlementValue ?"YES":"NO")' in your entitlements file."
241
235
childDiagnostics =[
242
-
.init(behavior:.note, location:.unknown, data:.init("To enable App Sandbox, remove the entitlement from your entitlements file, and set the \(appSandboxBuildSettingName)build setting to YES.")),
243
-
.init(behavior:.note, location:.unknown, data:.init("To disable App Sandbox, remove the entitlement from your entitlements file."))
236
+
.init(behavior:.note, location:.buildSettings(names:[buildSettingName]), data:.init("To enable '\(buildSettingName)', remove the entitlement from your entitlements file, and enable '\(buildSettingName)' in build settings.")),
237
+
.init(behavior:.note, location:entitlementsLocation, data:.init("To disable '\(buildSettingName)', remove the entitlement from your entitlements file."))
0 commit comments