Skip to content

Reverts change for test targets and softens warning #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,9 @@ private extension ProductPackagingToolSpec {
.init(behavior: .note, location: entitlementsLocation, data: .init("To enable '\(buildSettingName)', remove the entitlement from your entitlements file.")),
.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."))
]
} else {
message = "The '\(buildSettingName)' build setting is set to '\(buildSettingValue)', but entitlement '\(entitlement)' is set to '\(entitlementValue ? "YES" : "NO")' in your entitlements file."
childDiagnostics = [
.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.")),
.init(behavior: .note, location: entitlementsLocation, data: .init("To disable '\(buildSettingName)', remove the entitlement from your entitlements file."))
]
}

delegate.warning(message, childDiagnostics: childDiagnostics)
delegate.warning(message, childDiagnostics: childDiagnostics)
}
}
default:
break
Expand Down
2 changes: 0 additions & 2 deletions Sources/SWBUniversalPlatform/Specs/ProductTypes.xcspec
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,6 @@
INSTALL_PATH = "$(INSTALL_PATH_XCTRUNNER_$(USES_XCTRUNNER:default=NO))";
INSTALL_PATH_XCTRUNNER_YES = "$(DEFAULT_TEST_RUNNER_APP_INSTALL_PATH)";
INSTALL_PATH_XCTRUNNER_NO = "$(DEFAULT_TEST_BUNDLE_INSTALL_PATH)";
ENABLE_APP_SANDBOX = "$(USES_XCTRUNNER)";
ENABLE_OUTGOING_NETWORK_CONNECTIONS = "$(USES_XCTRUNNER)";

ENTITLEMENTS_REQUIRED = NO;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ fileprivate struct EntitlementsBuildOperationTests: CoreBasedTests {
], expectedWarnings: SWBFeatureFlag.enableAppSandboxConflictingValuesEmitsWarning.value ? [
"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\')",
"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\')",
"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\')"
] : nil
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -832,11 +832,7 @@ fileprivate struct CodeSignTaskConstructionTests: CoreBasedTests {

// When build setting and entitlement values disagree, we expect diagnostics
try await results(action: .build, overrides: ["ENABLE_APP_SANDBOX":"NO"], appSandboxEntitlementValueOverride: true) { results in
results.checkWarning(
.equal(
"The \'ENABLE_APP_SANDBOX\' build setting is set to \'NO\', but entitlement \'com.apple.security.app-sandbox\' is set to \'YES\' in your entitlements file.\nTo enable \'ENABLE_APP_SANDBOX\', remove the entitlement from your entitlements file, and enable \'ENABLE_APP_SANDBOX\' in build settings.\n/tmp/aWorkspace/aProject/Entitlements.plist: To disable \'ENABLE_APP_SANDBOX\', remove the entitlement from your entitlements file. (in target \'App\' from project \'aProject\')"
)
)
results.checkNoDiagnostics()
}
}

Expand Down
Loading