Can't install swiftui app to apple watch

Hi,

I created a new standalone, SwiftUI watch app. I tried to run the “Hello World” sample code provided by the template on my watch. However, I get the following error:

The executable was signed with invalid entitlements.
Domain: com.apple.dtdevicekit
Code: -402620394
Failure Reason: The entitlements specified in your application’s Code Signing Entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. (0xE8008016).

I haven’t changed any code or settings. I just created the project and tried to run it on my watch. I’m not sure where to start looking to fix this. Does anyone have any ideas?

Thank you,

Monica

Hi @monica, something you can try is by going to File → Workspace Settings, and make sure your build system is set to Legacy Build System.

Thank you @gdelarosa . I tried, but unfortunately it gave the error:

Building standalone watchOS apps is not supported by the legacy build system.

Ok, this was really weird. I switched it back to the new build system, and now it works. I didn’t change anything else. Very weird, but at least it works now. Thank you again @gdelarosa !

@monica, that is weird indeed but glad you can move forward!

Best,
Gina

This topic was automatically closed after 166 days. New replies are no longer allowed.