Debugging a real Apple watch: application verification failed

I tried to debug my WatchKit app on a real Apple Watch today. After clicking the Debug button in Xcode, the main iPhone application was installed correctly, but the Apple Watch displayed the message Failed to install xxx, error: application verification failed. . WatchKit application does not install.

I knew about this: WatchKit App was rejected for "Failed to Install" " , but that did not help, because my Xcode project file is fine.

How to do debugging work on a real Apple Watch?

+56
ios watchkit apple-watch
Apr 24 '15 at 17:54
source share
5 answers

It turns out that you also need to add the UDIDs in the Apple Watch to the Apple Developer Portal and update the development support profile to include this UDID.

UDIDs can be obtained from the Xcode Devices window. After pairing, Apple Watch information will automatically appear below your iPhone’s information.

At the time of this writing, this is not documented anywhere, and the error message in the Apple Watch was not particularly useful. Therefore, I wish this try-and-error lesson saves you a bit of trouble.

+80
Apr 24 '15 at 17:54
source share

The problem with the UDID as described above may be the culprit, but in my case it was handled automatically using Xcode. Viewing the device log (Window> Devices menu) showed:

companionappd [350]: could not install the WatchKit application, error: (Error Domain = LaunchServicesError Code = 0 "Operation could not be completed. (LaunchServicesError 0. failed to start.)" UserInfo = 0x14e2f690 {Error = ApplicationVerificationFailed, ErrorDetail = -402620394, ErrorDescription = Failed to verify the code signature: 0xe8008016 ( Found rights that are not allowed by the provisioning profile )})

... a problem that did not get into the build process and was not explicitly conveyed to me in screen errors.

So, I looked right:

enter image description here

Yes, I had to manually add this beta-reports-active to send to TestFlight.

It seems you need a flag if you are using TestFlight (and all except the default rights), but you need to not have a flag if you are debugging locally.

My solution to this contradiction is to have two rights files , for example:

enter image description here

So far so good. The App and Watch extension works as expected.

+3
Apr 24 '15 at 20:39
source share

Basically you need to follow two steps:

  • Add the UDID of your apple watch to the developer portal
  • Update your watch support profile

Xcode can manage the whole process for you:

1. Deploy the application to your iPhone / iPad

enter image description here

2. Launch the WatchKit app also on your iPhone / iPad (not in the simulator)

enter image description here

3. Select Fix Issue when a code signing error message appears.

enter image description here

4. Choose your development team and let Xcode do the rest.

I also wrote a short tutorial for this .

+3
May 01 '15 at 12:11
source share

Remember to scroll down on the “Devices” display in Xcode. Xcode → Window → Devices → Select “NameOfiPhone”, then scroll down to the right in the “Device Information” window. Then you will see the paired device. Yes, I admit the following :-)

+2
May 01 '15 at 2:04
source share

You must have an AppID for everyone. For example, if your application package identifier is "com.xyz", you will need three applications and provisioning profiles called

  • com.xyz
  • com.xyz.watchkitapp
  • com.xyz.watchkitapp.watchkitextension

Create resources for each and assign appropriate goals.

This will solve the problem. Make sure your UUID for iphone and watch must be added to these profiles.

Also, the version for all purposes should be the same.

+1
Sep 30 '15 at 4:32
source share



All Articles