Apple Watch (waiting for first unlock) in Xcode

I'm continuously getting this message in Xcode and I can't run my app on my Apple Watch. I'm running the latest versions of everything. I have tried to restart my Mac, my iPhone, my Watch. I tried to unpair and pair it back. Nothing is working. I also updated Xcode to 14.0.1 RC and that didn't help. How can I get this working? We're unable to do any work on our Watch App without this working. Thanks

Post not yet marked as solved Up vote post of coderkid Down vote post of coderkid
13k views
  • I upgraded to Mac OS Ventura 13.0.1 today and it seems to have fixed the "first unlock" issue i.e. Xcode can now see my watch thru my phone without me doing a bunch of stuff randomly. Yay!

Add a Comment

Replies

I assume you unlocked the iPhone attached to the Mac.

What do you see in "Devices" window in Xcode when attaching the iPhone (with which the watch is paired) to the Mac through USB ?

Do you see the paired Apple Watch ?

  • Yes, everything is unlocked and connected. It's showing up paired in Xcode. Everything is set up correctly, this is 100% a bug in Xcode.

  • Do you have the Feedback #?

  • FB11603770, thanks!

Add a Comment

I get this a lot, too. The only way I've found of fixing it is to quit Xcode, reboot the Watch, launch the iOS app manually (not build and deploy) and launch the Watch app manually (by tapping it on the Watch), then restarting Xcode. It occasionally works, but not every time.

It really is ridiculous that these stupid little things get in the way of working. Xcode needs to realise that there is an iPhone with a paired watch connected. There's no reason for "Waiting for first unlock" to appear when your iPhone is plugged in and your Watch is unlocked and paired with your iPhone.

  • Yup. It sometimes works that if you restart Xcode it will work again for a couple launches, but always fails again. Then I go through restarting all my devices. Sometimes that gets it working, but at that point most of the time it never works again for the rest of the day and we have to stop working on our Watch app. I have found debugging on an Apple Watch to always be this buggy. I swear our Watch development cycles are probably weeks-months longer because of these issues.

Add a Comment

If you get this, can you please try unlocking the watch and then unplugging the paired phone from the Mac and plugging it back in? Would love to know if that helps.

  • I've been facing the same issue and this didn't help

  • No that doesn't work. I've also tried rebooting every device. Sometimes quitting Xcode and starting it again gets it working. But that only lasts a few launches and then it fails again. Once it fails at that point it where restarting Xcode doesn't fit it, it wont work for the rest of the day. I can't identify any reason why, but when I come back the next morning it usually works again, but then fails after I launch it a few times and then wont work again for the rest of the day.

  • Is there any fix coming for this or temporary workaround? We are currently not able to get it working no matter what we do and have been unable to work on our watch app all week.

Did you - on you watch - go to settings and enable Developer Mode? https://developer.apple.com/documentation/xcode/enabling-developer-mode-on-a-device

It has to be done on the watch as well as on the iPhone.

Add a Comment

This happens with one of my watches but not the other. On my laptop I can fiddle around with some of the steps mentioned above and eventually get that Watch to make Xcode happy, but when connected to my Mac Studio it never works. Says it's waiting for the first unlock when the Watch is clearly unlocked and usable.

It is really unfortunate what a gigantic step back Xcode 14 has been in terms of watch development. It can be more than 30 minutes for Xcode to finish loading metadata and all the rest, only to get stuck with "waiting for first unlock". Yes, developer mode is enabled, yes both phone and watch are unlocked, no plugging and un-plugging doesn't work.

For all of you suffering with this issue, I'll share a workaround which is good if you don't need to check output from the Watch device on the Xcode debugger console and the watch App is setup as an extension (not standalone).

  • First, delete your Watch app from the Watch
  • Build and Run the app to the Phone (not the Watch)
  • When the Phone app is installed, go to the Watch app (the official Apple Watch app where you can change the Watch Faces)
  • Scroll all the way to the bottom, there you should see your Watch app as "Available" to install, hit that Install button
  • This will also take a little bit to complete, BUT it will be much faster than waiting for Xcode 14!

At the end you will have your Watch app installed on the Watch and the debugger attached to the Phone. That might be enough for some people. It was enough on my case, I was testing some UserInfo Transfer and could see the requests arriving on the Phone side and into the Xcode debugger console.

I hope that helps someone!

  • This is, in fact, the only way I found to be working...

  • I tried this on iOS 16.2 and the Watch app crashes as soon as I scroll to the bottom of the screen where my app would be 😒

Add a Comment

I get this very frequently as well. It seems like the Watch → iPhone → Xcode connection chain is incredibly flimsy. I've yet to find an incantation (short of reboot everything) that reliably solves it.

I have found this is much worse when using a USB hub rather than a direct UISB cable to connect the iPhone.

  • Thanks! This worked for me. Switched to a USB-C to lightning cable directly plugged in to my MacBook Air instead of USB A to lightning through my Lenovo dock and it worked! Funny this should make a difference since the connection to the iPhone never had issues and the connection to the watch is wireless -but there you have it.

Add a Comment

Using iOS 16.0 on iPhone 13 Pro and WatchOS 9.0.2 on Apple Watch 7 Xcode 14.0.1

I was having similar issue waiting for first unlock. Developer mode enabled on both phone and watch. Tried all the recommendations to no avail. Finally disabled and then enabled developer mode on the phone (which required a phone re-boot). I was then able to test on the watch (waiting for first unlock warning disappeared)

Add a Comment

This is beyond ridiculous. It is impossible to work on apps for Apple Watch. I've been rebooting everything for two days and it still doesn't work.

I have found the following to work: from your phone, remove the watch app by toggling the "show on watch". If you have a watch only app, delete the app from the watch.

That's it, you should now be able to install and launch the watch app from Xcode.

  • I can't even have my app yet on my physical Watch because of this issue.

  • It works for me.

    Delete the watch app that you tested last time.Unplug and re-plug the USB.Wait about 30 seconds, "waiting for first unlock" will disappear.
Add a Comment

Same problem here. This is completely ridiculous and makes it impossible to develop watch apps on Xcode 14.

This is like 9 version of watchOS, and literally not a single one allowed development on real device. Number of disconnects, deletions, cache clear, pairing unparing required AND ADVISED by APPLE!!! its insane. I am really scared what will happen once they actually ditch ports, we will be completely screwed.

I ran into this problem and other while building a watch app. Developing watch apps in XCode 14 using a physical device is now extremely difficult. All solutions above partially working, you need to experiment.