Xcode 13 cannot run project generated by Xcode 12.5.1

Hello,

I cannot use Xcode 13 in order to run the project previously generated by Xcode 12.5.1. I got an error message on install:

The executable was signed with invalid entitlements.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620394

How to reproduce:

  1. Open Xcode 12.5.1 and generate a new empty ios app.
  2. Press Run and see how it builds and runs on your device.
  3. Now open the same project with Xcode 13.
  4. Press Run and observe how it fails to install the app.

Is it a bug?! How to make it work in new Xcode?!

Thanks

Answered by ykleban in 689529022

Found the issue. When open in Xcode 13, it fails to run on a device because the flag ENABLE_APP_SANDBOX was set TRUE. It is weird, it is working in Xcode 12.5.1. When set the flag to FALSE, Xcode 13 is able to install and run the app.

Did Xcode 13 prompt you to update the project settings?
Is Xcode 13 showing any other build errors or warnings?

Usual projects created with Xcode 12.5.1 build and run without any issues using Xcode 13. Does your project have any third party libraries?

No, I don't use any 3rd-party libraries.

Accepted Answer

Found the issue. When open in Xcode 13, it fails to run on a device because the flag ENABLE_APP_SANDBOX was set TRUE. It is weird, it is working in Xcode 12.5.1. When set the flag to FALSE, Xcode 13 is able to install and run the app.

Xcode 13 includes significant changes in how it handles Info.plist properties and entitlements. The source of truth for some items is now a build setting rather than the property list. In your specific example, in Xcode 12 and earlier the source of truth for the App Sandbox setting was the presence of com.apple.security.app-sandbox in your entitlements file, whereas now it’s the ENABLE_APP_SANDBOX build setting.

I’m not sure how your Xcode 12 project got the ENABLE_APP_SANDBOX build setting set for an iOS target but its presence was causing the App Sandbox entitlement to be set and that’s not supported on iOS which is why your app wouldn’t run.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Xcode 13 cannot run project generated by Xcode 12.5.1
 
 
Q