ChatGPT解决这个技术问题 Extra ChatGPT

In Xcode I see (no paired Apple Watch) even though the watch is paired and the watch's UDID is registered

My phone is listed as an ineligible target in Xcode and out to the side it says (no paired Apple Watch).

My Apple Watch is registered under iOS Devices. I can see the UDID. The watch has watchOS 2.0 installed and my iPhone 6 has iOS 9 installed. The iPhone pairs just fine with the watch and I can install apps.

I've tried rebooting both the watch and the phone. I've tried rebooting Xcode. I tried creating a new scheme in Xcode but it still shows (no paired Apple Watch). I can choose Product/Destination and the app will show up on the phone, it just won't install the watch app...just sits there saying "Installing...".

In Xcode if you go to Window -> Devices and click on your phone you see your watch right?
@kdogisthebest No, the watch is not listed as a Device. The phone is listed.
I'm experiencing this in Xcode 7.1 beta but not in 7.0. Tried all of the solutions on this page to no avail. I was building to my watch just fine until suddenly this message appeared.
In my case enabling bluetooth fix the problem :)

j
jede

I had paired my watch with a new phone and run in to this problem. I removed all files in ~/Library/Developer/Xcode/watchOS DeviceSupport/ and it solved it!


This is the real solution, It worked for me perfectly
Worked for me as well.
I don't find "watchOS DeviceSupport" folder.
Worked for me (so many wasted reboots!). And the simulators still work too.
after the above (answer), reconnect the iphone
e
eCeleritas

What worked for me is to go to the WatchKit App target and update the Team with the proper account. Once I did that, my device showed as eligible.


This did not fix the problem for me. I am having the exact same issue. My watch does not show up in Devices at all even though it clearly is paired to my phone (I can use all watch functions you'd expect to be able to). I have even tried resetting the watch and setting it up as a new device to no avail. (I did receive the Trust prompt on the watch, which I acknowledged.)
Make sure to do this on both the Watch App and the Extension
u
user2875404

2022, 5 year anniversary: For the past 6 months, I consistently have to sit through one hour of "Preparing Apple Watch for development via iPhone" even when I'm not even debugging a Watch app. Needless to say, this also makes it impossible to run apps on device via Xcode. After about 3 hours (basically half my workday) it starts to work. Once I remove the app for testing, or unplug the iPhone, I have to wait a few hours again. Never in my life have I felt so useless as my job at this point basically consists of watching a loading indicator for hours until the process is done - only for the whole thing still not working most of the time.

Fun fact: Apple on Twitter claims they use the same devices and tools for their Watch apps.

2021: All Quiet on the Western Front. It's been 4 years since my first response. I've now had a good run during December and the first 2 weeks of January. It was so good that I haven't closed the simulator a single time and kept my iPhone connected and never turned off my mac. This worked for 3 weeks but then my iPhone ended up in a boot loop and restoring fails. I bought a new iPhone and now I also can't really connect anymore. See y'all in 2022 :)

2020: At this point I can't even get WCSession to send data on the Simulators anymore. Message from Watch to iPhone with replyHandler works, message from iPhone to Watch fails with WCErrorCodeWatchAppNotInstalled. Every day starts with rebooting numerous times and deleting and setting up new iPhone + Watch combinations. Tried on a freshly installed macOS with my friend's devices and of course no luck. But it's clearly my fault. Submitting a bug report doesn't do anything as they only keep telling you that everything is working on their end and they will close this ticket now. I only wanted to help.

2019: New iPhone, even worse. Now, every single component in my development has changed since 2017 and I'm still stuck targeting the simulator with every build. Apple, why?

2018 II: nothing works for me anymore. Contacted Apple loads of times and Apple Watch seems to have moved to Playground's neighborhood as it's just loading/running but never really running. Bought a second Mac, new project, nothing works. Sad.

2018: The last couple of days I have been really successful doing the following:

On your iPhone:

turn off wifi

turn off bluetooth

turn on wifi

turn on bluetooth

On your Watch:

turn on flight mode

deactivate flight mode

Most of the times it didn't take longer than 30 seconds to get the connection back on track. I think it's the "Watch flight mode"-thing but I never change a (somewhat) running system so this will be my procedure from now on. My 2017-reply still seems to be of help to some people:

2017: If it SOMETIMES shows, and often doesn't, it might be due to the fact that you closed iTunes

I noticed what I often did after reconnecting: closing iTunes. Immediately, the watch turned to be "unpaired". Reconnecting the USB cable but leaving iTunes open has helped me since.


Couldn't believe it myself but I tested it like 10 times and iTunes was always the deciding factor so yea
Does not solve the problem for me. This is such an annoying bug that slows watch development.
Has anyone filed a radar?
This problem has come up 2015 and pretty much everyone experiences it, Apple probably just doesn't care as it works 5% of the times which seems to be enough for them
It is 2020 and I have wasted hours to try to convince Xcode to run an app on my watch. I would use the Simulator but CloudKit (which is now the recommended way of getting data in and out of the watch app) is not supported on the watch simulator. I don't understand how anybody manages to develop Apple Watch apps.
B
Berni

Open the camera companion app on the watch. For me this works. Seems like the app starts a phone connection.


I just had this issue, and this fixed it for me. Thanks!
B
Bogdan

It seems that you need to tap on the "Trust this computer" message on Apple Watch. This solved my problem. Also check if XCode displays the message "Indexing..." or "Loading symbols...": you need to wait until the operation is over.


E
Eduard Klinger

It looks like a bug in Xcode! Go to ~/Library/Developer/Xcode/watchOS DeviceSupport/ and create a folder named "Watch1,2 2.0 (build number)" and for 'build number' use your watchOS build number. Inside this folder create another folder named "Symbols".

So for the latest build: ~/Library/Developer/Xcode/watchOS DeviceSupport/Watch1,2 2.0 (13S5305d)/Symbols.

Maybe clean & restart Xcode.


Seems to have worked for me, though I also tried all the other answers listed here, so who knows? Could've been one of the other ones...
selecting correct team was all I needed, definitely still a bug because its extremely misleading...
y
yspreen

For me it was an issue of trusting the computer from the watch. I had to reboot my watch to get the "trust this computer" request.


Xcode did not show my iPhone on Xcode when I selected watchkit app. I rebooted my Apple Watch (5.1.3), and Xcode now showing iPhone and watch.
p
pedanticmoose

In my case I believe it was because I had Connect via network enabled for the iPhone that's paired with my new watch.

Upon disabling the wireless connect feature, then connecting the iPhone to my mac via cable, the watch appeared in the Devices list.

After getting the UUID to register with the Developer Center I re-enabled Connect via Network and the watch was no longer listed on the Devices screen. When I connect the phone via cable, however, the watch info appears.

So if you're using wireless connect, try just plugging the device in via cable and hopefully you'll see your watch in the list. Good luck!


R
Ric Santos

I had to delete my Apple ID from the Accounts tab in Xcode preferences and then re-add it.


M
Maciej Swic

What worked for me is just waiting for about a minute. There was no progress bar in Xcode, just wait.


I opened Watch app on iPhone and it took half a minute to see the paired Watch in Xcode. Don't know if it is useful.
I
Ing. Ron

For me helped open iTunes at the MAC and leave it open.

Xcode 9.4.1


R
ReactiveRaven

Check the phone is connected to the same wifi network as the computer.

I've just spent a few days struggling with this, trying the solutions above. Switched networks, waited a minute, now it works again. Gah.

I have four wifi SSIDs in my home (old house, thick walls, one router won't cover it properly) and it turned out the computer was choosing one, and the phone another.


P
Piidro

I have the exact same setup and had the same problem. What seemed to work for me was just unpairing and pairing the watch again. Then Trust this computer on the watch and Xcode started to list it in the menu.

It seems that I updated the watchOS2 beta 5 on top of 1.0.1 which was paired earlier and it just needed to be re-set for watchOS2.


b
bruce1337

What worked for me was to open Xcode's Projects window and click the Delete button next to the Derived Data line for the currently open project. After that, the target automatically switched to show [My iPhone Name] + [My Watch Name].

My setup: Xcode 7, iOS 9 (public release), and watchOS 2 beta.


d
david72

Open Watch app on device, scroll down to your app, and make sure to enable show app on apple watch


M
Mohammad Zaid Pathan

Setting Correct Provisioning profiles | Certificates | Team, then restarting Xcode worked for me.


M
Magnus

You must have connected your Apple Watch with you iPhone by bluetooth, wifi connection won´t work for testing...


P
Patricks

I really struggled with this problem but this helped me:

Fix steps :

Unpair my watch Reboot both iPhone and apple watch Pair them again,and setup my watch as a new one Plug (unplug first) iPhone to Mac On apple watch, say Trust the computer when it asks Unplug and plug again Close and open XCode Open the project and wait a few seconds


This helped me too! The important part was to set up the watch as a new one, instead of restoring from backup.
G
GarySabo

I may have had a breakthrough....I turned off WIFI on my Mac and it instantly found the watch 😱


d
david72

This worked for me (Xcode 11.3.1) :

Open Devices from Xcode Disconnect iPhone from Mac Disable bluetooth on iPhone Re-connect iPhone to Mac Verify iPhone is showing in Devices. Turn on bluetooth on iPhone, wait to see that watch is connected on iPhone. Look in Devices -> your iPhone -> Paired watches -> wait for the watch info to completely show. At this point I was able to see watch in Xcode.

In some cases also needed to restart Watch & Phone as well.


v
vanna

This worked for me 1. Quit Xcode. 2. Disconnect iPhone 3. Remove cache files at /Users//Library/Developer/Xcode 4. Run Xcode. 5. Connect iPhone again 6. Xcode will start to download the symbol file


What cache files specifically?
K
Kemal Can Kaynak

Just reconnect my iPhone to my Mac is solved my problem. When i reconnect my iPhone, xcode installed itself missed symbols automatically.


T
Taz

I had a similar issue where Xcode was not detecting my paired watch. Somehow, the beta provisioning profile had managed to get installed onto my phone and for some reason Xcode could not detect the paired watch. As soon as I deleted the provisioning profile, Xcode started to pick up the paired watch.


M
Max

Creating a new watchOS project lead to download of symbols to resume and finish. I unplugged the iPhone before "Processing symbol files" operation was finished. So Apple Watch never showed up again. XCode 9 (beta 4). iOS 10 (beta 4). watchOS 2.2.2.


Y
Yizhar

I just waited several minutes and then - it worked by itself.

WatchOS 4.1, XCODE 9.2.


S
Stanislas Heili

The solution that worked for me with XCode 10.0: trash the whole Xcode folder in ~/Library/Developer/Xcode, removing only the watchOS DeviceSupport was not enough


D
Diego Jiménez

New update to this issue. I have recently buy the ray wenderlich book for Watch OS and I have had this problem.

After testing a lot of things, and before delete any files, my working solution is this:

On MAC with Xcode open and with the issue scheme loaded. iPhone plugged in and watch turned on too.

1) On MAC turn off wifi 2) On MAC turn on wifi 3) On MAC turn off bluetooth 4) On MAC turn on bluetooth

I know this solution is above, but is the only way it has worked for me. Hope it helps to any dev too.


For me it was enough to just turn wifi off on my mac. Then the watch appeared in the Devices window and I was able to run successfully on a watch on my wrist. Btw, my iPhone was connected through USB at that time.
N
Navigator

Check that Bluetooth is enabled. I restarted my Mac, my phone and my watch and that didn't help. When I looked in settings on the watch I found that Bluetooth was disabled.


l
lewis

In my case, rebooting the watch did not work, but after rebooting iPhone it did.


S
Silvering

Xcode Version 12.2 (12B45b) seems to fixed all issues regarding the app transfer from your mac to your apple Watch.