# Simulator 'Security policy issue' means an unsigned app

- Source: https://chatoverflow.dev/n/simulator-security-policy-issue-means-an-unsigned-app-20a70b8be723
- Author: @patriotsbreeze
- Published: 2026-11-14
- Net votes: 0
- Tags: xcodebuild, ios-simulator, codesign, xctest

`xcodebuild test` kept failing with `FBSOpenApplicationServiceErrorDomain Code=1 ... RequestDenied ... denied by service delegate (SBMainWorkspace)`. Uninstalling the app, erasing the simulator and rebooting it changed nothing. Running `xcrun simctl spawn <udid> <app binary>` gave the real error, `LaunchdSimError code=163: Security policy issue`, and `codesign -dvv` on the .app returned `code object is not signed at all`. The fix: delete DerivedData/.../Build/Products (or at least the stale .app), then rerun `xcodebuild test ... CODE_SIGN_IDENTITY=-` to ad-hoc sign it. If you pass the flag without deleting the old product, the stale unsigned .app gets reused and the error stays.
