pkamb
pkamb

Reputation: 34983

Prevent Xcode from preparing Apple Watch when running for iOS

I have an iOS app that I want to test on my personal iOS device. I also wear an Apple Watch that's connected normally to this iPhone.

I have not knowingly created any kind of Apple Watch target or code in my Xcode project. I do not want to run or test the app on my Apple Watch. I have not set up the Apple Watch as some kind of development target in Xcode... it's just connected to my iPhone.

Despite this, Xcode continually tries to ready my Apple Watch for development alongside the iPhone. It delays running the iOS app on the iPhone so that it can "prepare" and "fetch" various things from the Watch. These spinners never end and as a result I am unable to deploy the iOS app to the iPhone.

iPhone is busy: Preparing Apple Watch for development via iPhone

iPhone is busy: Preparing Apple Watch for development via iPhone
Xcode will continue when iPhone is finished.

iPhone is busy: Fetching debug symbols for Apple Watch paired to iPhone

Fetching debug symbols for the watch
Installing Symbols for watchOS 7.4

Apple Watch via iPhone: Failed to prepare device for development.
This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your mac and device in order to correctly detect compatibility.

How can I fully hide this Apple Watch from being seen by Xcode? Disable any kind of development on the Watch? Deploy the iOS app to the iPhone without involving the connected Apple Watch at all?

I'm not interested in "fixing" the errors and warnings... I want the Apple Watch to not be used at all by Xcode.

Upvotes: 24

Views: 9163

Answers (6)

Islam
Islam

Reputation: 3734

Not a solution, but the cause:

If Xcode doesn't have the SDK version of your iPhone (e.g. Xcode 14.2 comes with iOS 16.2 and your iPhone is on 16.1) then Xcode downloads the missing SDK and given that it's several GBs the time it takes would depend on your network speed. (Same applies for Watch OS).

Upvotes: 1

Graystripe
Graystripe

Reputation: 381

Just powering off the watch, unplug/replug device, and restart Xcode worked for me!

Upvotes: 0

patel dhruval
patel dhruval

Reputation: 1052

For me just turning off Wifi and Bluetooth on the phone worked. So follow the below steps:

  1. Stop the Xcode project
  2. Turn off WIFI and Bluetooth on your phone only
  3. Run the Xcode project

Upvotes: 2

taiyodayo
taiyodayo

Reputation: 377

If you've installed Xcode from Mac App Store, I've experienced a few cases where Xcode just won't update. (and it says "no update" even if you check for update from the app menu)

Solution: login to your Apple Developer account, then click this link. https://developer.apple.com/download/all/?q=Xcode

Download the latest version of Xcode .xip file (as of today Xcode 13.3.xip) then move the file to /Applications.

Delete current install of Xcode, then double-click the .xip just downloaded to install it.

It should then work and continue to receive future updates.

Upvotes: -1

coderSeb
coderSeb

Reputation: 111

Additionally, make sure you've updated Xcode to a version that supports your iOS/watchOS version (proper SDKs) - I've found this to be necessary to avoid the interminable 'preparing...' phase.

Upvotes: 2

Wesley Barnes
Wesley Barnes

Reputation: 671

Found this workaround, worked for me.

  • Unplug iPhone
  • Switch flight mode on the Watch
  • Switch off Bluetooth on the Watch
  • Plug the iPhone back in and build Good luck!

https://developer.apple.com/forums/thread/691452?answerId=704424022#704424022

Upvotes: 10

Related Questions