@@ -238,24 +238,24 @@ fileprivate struct EntitlementsBuildOperationTests: CoreBasedTests {
238
238
}
239
239
}
240
240
241
- /// Test that the `ProcessProductEntitlementsTaskAction` does not embed build settings based entitlements that are dependent on App Sandbox being enabled, when App Sandbox is disabled .
242
- @Test ( . requireSDKs( . macOS ) )
243
- func macOSAppSandboxEnabledEntitlementsWithSandboxDisabled ( ) async throws {
241
+ /// Test that the `ProcessProductEntitlementsTaskAction` does not embed build settings that only apply to macOS .
242
+ @Test ( . requireSDKs( . iOS ) )
243
+ func iOSAppSandboxAndHardnedRuntimeBuildSettingEnabled ( ) async throws {
244
244
try await withTemporaryDirectory { tmpDirPath async throws -> Void in
245
245
let testWorkspace = entitlementsTestWorkspace (
246
246
sourceRoot: tmpDirPath,
247
247
buildSettings: [
248
248
" PRODUCT_NAME " : " $(TARGET_NAME) " ,
249
249
" INFOPLIST_FILE " : " Info.plist " ,
250
- " CODE_SIGN_IDENTITY " : " - " ,
251
- " RUNTIME_EXCEPTION_ALLOW_DYLD_ENVIRONMENT_VARIABLES " : " NO " ,
252
- " RUNTIME_EXCEPTION_ALLOW_JIT " : " NO " ,
253
- " RUNTIME_EXCEPTION_ALLOW_UNSIGNED_EXECUTABLE_MEMORY " : " NO " ,
254
- " AUTOMATION_APPLE_EVENTS " : " NO " ,
255
- " RUNTIME_EXCEPTION_DEBUGGING_TOOL " : " NO " ,
256
- " RUNTIME_EXCEPTION_DISABLE_EXECUTABLE_PAGE_PROTECTION " : " NO " ,
257
- " RUNTIME_EXCEPTION_DISABLE_LIBRARY_VALIDATION " : " NO " ,
258
- " ENABLE_APP_SANDBOX " : " NO " ,
250
+ " AD_HOC_CODE_SIGNING_ALLOWED " : " YES " ,
251
+ " RUNTIME_EXCEPTION_ALLOW_DYLD_ENVIRONMENT_VARIABLES " : " YES " ,
252
+ " RUNTIME_EXCEPTION_ALLOW_JIT " : " YES " ,
253
+ " RUNTIME_EXCEPTION_ALLOW_UNSIGNED_EXECUTABLE_MEMORY " : " YES " ,
254
+ " AUTOMATION_APPLE_EVENTS " : " YES " ,
255
+ " RUNTIME_EXCEPTION_DEBUGGING_TOOL " : " YES " ,
256
+ " RUNTIME_EXCEPTION_DISABLE_EXECUTABLE_PAGE_PROTECTION " : " YES " ,
257
+ " RUNTIME_EXCEPTION_DISABLE_LIBRARY_VALIDATION " : " YES " ,
258
+ " ENABLE_APP_SANDBOX " : " YES " ,
259
259
" ENABLE_FILE_ACCESS_DOWNLOADS_FOLDER " : " readwrite " ,
260
260
" ENABLE_FILE_ACCESS_PICTURE_FOLDER " : " readonly " ,
261
261
" ENABLE_FILE_ACCESS_MUSIC_FOLDER " : " readwrite " ,
@@ -271,7 +271,7 @@ fileprivate struct EntitlementsBuildOperationTests: CoreBasedTests {
271
271
" ENABLE_RESOURCE_ACCESS_PHOTO_LIBRARY " : " YES " ,
272
272
" ENABLE_RESOURCE_ACCESS_USB " : " YES " ,
273
273
" ENABLE_RESOURCE_ACCESS_PRINTING " : " YES " ,
274
- " SDKROOT " : " macosx "
274
+ " SDKROOT " : " iphoneos "
275
275
]
276
276
)
277
277
@@ -481,47 +481,6 @@ fileprivate struct EntitlementsBuildOperationTests: CoreBasedTests {
481
481
}
482
482
}
483
483
484
- /// Test that the `ProcessProductEntitlementsTaskAction` does not embed build settings based entitlements that are dependent on Hardened Runtime being enabled, when Hardened Runtime is disabled.
485
- @Test ( . requireSDKs( . macOS) )
486
- func macOSHardenedRuntimeEnabledEntitlementsWithHardenedRuntimeDisabled( ) async throws {
487
- try await withTemporaryDirectory { tmpDirPath async throws -> Void in
488
- let testWorkspace = entitlementsTestWorkspace (
489
- sourceRoot: tmpDirPath,
490
- buildSettings: [
491
- " PRODUCT_NAME " : " $(TARGET_NAME) " ,
492
- " INFOPLIST_FILE " : " Info.plist " ,
493
- " CODE_SIGN_IDENTITY " : " - " ,
494
- " ENABLE_HARDENED_RUNTIME " : " NO " ,
495
- " RUNTIME_EXCEPTION_ALLOW_DYLD_ENVIRONMENT_VARIABLES " : " YES " ,
496
- " RUNTIME_EXCEPTION_ALLOW_JIT " : " YES " ,
497
- " RUNTIME_EXCEPTION_ALLOW_UNSIGNED_EXECUTABLE_MEMORY " : " YES " ,
498
- " AUTOMATION_APPLE_EVENTS " : " YES " ,
499
- " RUNTIME_EXCEPTION_DEBUGGING_TOOL " : " YES " ,
500
- " RUNTIME_EXCEPTION_DISABLE_EXECUTABLE_PAGE_PROTECTION " : " YES " ,
501
- " RUNTIME_EXCEPTION_DISABLE_LIBRARY_VALIDATION " : " YES " ,
502
- " ENABLE_FILE_ACCESS_DOWNLOADS_FOLDER " : " readwrite " ,
503
- " ENABLE_FILE_ACCESS_PICTURE_FOLDER " : " readonly " ,
504
- " ENABLE_FILE_ACCESS_MUSIC_FOLDER " : " readwrite " ,
505
- " ENABLE_FILE_ACCESS_MOVIES_FOLDER " : " readonly " ,
506
- " ENABLE_INCOMING_NETWORK_CONNECTIONS " : " YES " ,
507
- " ENABLE_OUTGOING_NETWORK_CONNECTIONS " : " YES " ,
508
- " ENABLE_RESOURCE_ACCESS_AUDIO_INPUT " : " YES " ,
509
- " ENABLE_RESOURCE_ACCESS_BLUETOOTH " : " YES " ,
510
- " ENABLE_RESOURCE_ACCESS_CALENDARS " : " YES " ,
511
- " ENABLE_RESOURCE_ACCESS_CAMERA " : " YES " ,
512
- " ENABLE_RESOURCE_ACCESS_CONTACTS " : " YES " ,
513
- " ENABLE_RESOURCE_ACCESS_LOCATION " : " YES " ,
514
- " ENABLE_RESOURCE_ACCESS_PHOTO_LIBRARY " : " YES " ,
515
- " SDKROOT " : " macosx "
516
- ]
517
- )
518
-
519
- try await buildTestBinaryAndValidateEntitlements ( testWorkspace: testWorkspace, expectedEntitlements: [
520
- " com.apple.application-identifier " : " $(AppIdentifierPrefix)$(CFBundleIdentifier) " ,
521
- ] )
522
- }
523
- }
524
-
525
484
@Test ( . requireSDKs( . iOS) )
526
485
func simulatorEntitlementsSections( ) async throws {
527
486
try await withTemporaryDirectory { tmpDirPath in
0 commit comments