Skip to content

Commit 89cab9c

Browse files
committed
Removes app sandbox mismatch warning in some cases (rdar://150338157)
1 parent 1a2981e commit 89cab9c

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

Sources/SWBCore/SpecImplementations/Tools/ProductPackaging.swift

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,9 @@ private extension ProductPackagingToolSpec {
228228
.init(behavior: .note, location: entitlementsLocation, data: .init("To enable '\(buildSettingName)', remove the entitlement from your entitlements file.")),
229229
.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."))
230230
]
231-
} else {
232-
message = "The '\(buildSettingName)' build setting is set to '\(buildSettingValue)', but entitlement '\(entitlement)' is set to '\(entitlementValue ? "YES" : "NO")' in your entitlements file."
233-
childDiagnostics = [
234-
.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.")),
235-
.init(behavior: .note, location: entitlementsLocation, data: .init("To disable '\(buildSettingName)', remove the entitlement from your entitlements file."))
236-
]
237-
}
238231

239-
delegate.warning(message, childDiagnostics: childDiagnostics)
232+
delegate.warning(message, childDiagnostics: childDiagnostics)
233+
}
240234
}
241235
default:
242236
break

Tests/SWBBuildSystemTests/EntitlementsBuildOperationTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,6 @@ fileprivate struct EntitlementsBuildOperationTests: CoreBasedTests {
427427
], expectedWarnings: SWBFeatureFlag.enableAppSandboxConflictingValuesEmitsWarning.value ? [
428428
"The \'ENABLE_RESOURCE_ACCESS_AUDIO_INPUT\' build setting is set to \'YES\', but entitlement \'com.apple.security.device.audio-input\' is set to \'NO\' in your entitlements file.\nTo enable \'ENABLE_RESOURCE_ACCESS_AUDIO_INPUT\', remove the entitlement from your entitlements file.\nTo disable \'ENABLE_RESOURCE_ACCESS_AUDIO_INPUT\', remove the entitlement from your entitlements file and disable \'ENABLE_RESOURCE_ACCESS_AUDIO_INPUT\' in build settings. (in target \'App\' from project \'aProject\')",
429429
"The \'ENABLE_FILE_ACCESS_MOVIES_FOLDER\' build setting is set to \'readOnly\', but entitlement \'com.apple.security.assets.movies.read-only\' is set to \'NO\' in your entitlements file.\nTo enable \'ENABLE_FILE_ACCESS_MOVIES_FOLDER\', remove the entitlement from your entitlements file.\nTo disable \'ENABLE_FILE_ACCESS_MOVIES_FOLDER\', remove the entitlement from your entitlements file and disable \'ENABLE_FILE_ACCESS_MOVIES_FOLDER\' in build settings. (in target \'App\' from project \'aProject\')",
430-
"The \'RUNTIME_EXCEPTION_ALLOW_JIT\' build setting is set to \'NO\', but entitlement \'com.apple.security.cs.allow-jit\' is set to \'YES\' in your entitlements file.\nTo enable \'RUNTIME_EXCEPTION_ALLOW_JIT\', remove the entitlement from your entitlements file, and enable \'RUNTIME_EXCEPTION_ALLOW_JIT\' in build settings.\nTo disable \'RUNTIME_EXCEPTION_ALLOW_JIT\', remove the entitlement from your entitlements file. (in target \'App\' from project \'aProject\')"
431430
] : nil
432431
)
433432

0 commit comments

Comments
 (0)