The UDID issue as described above can be the culprit, but in my case, that was handled automatically by Xcode. Looking at the device log (menu Window>Devices) showed:
companionappd[350] : failed to install WatchKit application, error:
(Error Domain=LaunchServicesError Code=0 "The operation couldn’t be
completed. (LaunchServicesError error 0.)" UserInfo=0x14e2f690
{Error=ApplicationVerificationFailed, ErrorDetail=-402620394,
ErrorDescription=Failed to verify code signature of : 0xe8008016
(Entitlements found that are not permitted by provisioning profile)})
... a problem which didn't get caught in the build process, nor was explicitly shared with me in the on-screen errors.
So, I looked at the entitlements:
Yes, I did have to manually add that beta-reports-active
in order to submit to TestFlight.
It seems that you needs the flag if you're using TestFlight (and anything other than the default Entitlements), but you need to not have the flag if you're debugging locally.
My solution to this contradiction therefore is to have two entitlements files, like so:
So far, so good. App and Watch Extension are running as expected.