9 Replies
      Latest reply on Jan 10, 2019 1:27 AM by Claude31
      Claude31 Level 8 Level 8 (5,335 points)

        I repeat this older thread, as it does not show on the forum with my added post !

         

        https://forums.developer.apple.com/message/298938#298938

         

        I answered to KMT answer (I read the referenced thread)

        ---------------

        Looks like that triggered the name change dialog.

         

        Can you just right click on the watch name without that happening? Try it on the phone, on the left so see what I'm looking for.

        Otherwise, this sounds like what others went thru (routine pairing v o o d o o ) in this SO thread - seen it ? [ filter does not like v o o …]

         

        https://stackoverflow.com/questions/30792520/in-xcode-i-see-no-paired-apple-watch-even-though-the-watch-is-paired-and-the-w

        -------------------------

         

        So, my question now

         

        I run in the same problem.

         

        I just got the Apple Watch (4, OS 5.1.1) and use XCode 10.1. OSX 10.13.6

         

        I can create the app + WatchOS  on simulator without problem. But not on device.

         

        The watch is paired with iPhone.

         

        I connect iPhone with USB

        => get the message :

        The iPhone "iPhone XS" can not be used because it requires iTunes 12.9 or later. Do you want to download the latest version of iTunes now?

         

        I ignore the message (as I think iTunes 12.9 requires Mojave, isn't it ?). Could it be the problem ???

         

        In XCode, I select the scheme    iPhone Xs of XXX + Apple Watch of XXX

        I run, it compiles OK, but at the end says:

         

        "Finished running myApp on Apple Watch of XXX" in the XCode bar

        Plus alert:

        App installation failed

        The host is not paired with the device.

         

        I have checked in XCode Devices:

        - on the left, I see iPhoneXS of XXX

        - but not the Watch

        - On the right of Devices window, I see the PAIRED WATCHES:

        Apple Watch of XXX

         

        I also checked that Apple Watch is listed with an UDID in the Devices list

         

        The scheme was in Debug  mode.

        So, I changed to release mode, and get the message in Scheme that paired devices not available for debug.

         

        So, Compile again, but then get message :

        Could not launch 'Autonomie' on iPhone XS XXX

        There was an error preparing Apple Watch de XXX for development.

        Try reattaching the device to which Apple Watch de XXX is paired. The device rejected the pairing attempt.

         

        So I unpaired the device.

        Reattached

        Truted the host

         

        Run again, just to get again the message

        The host is not paired with the device.

         

        I do not see which and where I should pair.

        • Re: Unable to install test app on Apple Watch
          Claude31 Level 8 Level 8 (5,335 points)

          Now, I reste the list of devices in XCode.

           

          I can compile an App to the iPhone.

           

          But when I try to compile with watch extension, I get error:

           

          Could not launch 'App' on iPhone XS XXX

          There was an error preparing Apple Watch de XXX for development.

           

          Try reattaching the device to which Apple Watch de XXX is paired. This device is no longer connected.

           

          I did the following again

           

          So I unpaired the device. (Device window in Xcode, right click oh iPhone Device > unpair)

          Reattached (click +, wait some time, select iPhone) ; but in fact, reattched automatically as soon as I unlock iPhone XS.

          Trusted the host

           

          But no change

          • Re: Unable to install test app on Apple Watch
            PBK Level 6 Level 6 (2,885 points)

            TMI.

            Can you run the app using Xcode on that iPhone that is connected to your computer?

            If no - stop and fix that.

            If yes - is your Apple Watch paired to that iPhone?

            If no - stop and fix.

            If yes - it should work.

              • Re: Unable to install test app on Apple Watch
                Claude31 Level 8 Level 8 (5,335 points)

                Can you run the app using Xcode on that iPhone that is connected to your computer?

                 

                If I compile the version of the App alone (a different project, without the watch extension), yes.

                But with the watch extension, No. In fact, I get now the message in the scheme that scheme is unavailable

                     There was an error preparing Apple Watch de XXX for development. Try reattaching the device to which Apple watch is paired. The device is no longer connected

                => I unpaired the iPhone from Device window and reattached (it reattached automatically as soon as unlocked iPhone)

                 

                If no - stop and fix that.

                How could I select to compile the app alone ? (sorry for this very basic question)

                 

                If yes - is your Apple Watch paired to that iPhone?

                If no - stop and fix.

                If yes - it should work.

                 

                EDITED

                Found an interested thread here, with a proposed analysis and solution:

                h ttps://github.com/xamarin/xamarin-macios/issues/4345

                 

                OK, so the issue was that at some point I must've clicked "Don't trust this computer" on my Apple watch when I connected my iPhone to my work computer. Opening the macOS Console app and selecting the Apple watch was the only tool that gave me an error message that led me to suspect that my watch was set to not trust my computer. To fix, I had to unpair and re-pair my apple watch to my iphone, plug it in via USB and oppen XCode and/or the Console app until I got the dialog on my watch asking to trust the computer. This time I made sure to select "Trust this computer."

                Now I see the device in Visual Studio 2017 Windows, but still getting a message that "debugging is not supported in this configuration." and to start without debugging.

                Starting without debugging fails first attempt due to timeout due to length of time it takes to deploy. Worked second time once watch app was already installed.
                I will test further in VS for Mac (just tested in VS 2017 Windows after re-pairing the watch and trusting the computer)

                 

                 

                I'm keen to try it, but how do I unpair nthe watch from the iPhone without risking to loose all configuration (such as eSim activation) ?

                Should it be done in XCode?

                     Device window in Xcode, right click on iPhone Device > unpair

                     Reattached (click +, wait some time, select iPhone)

                     Trusted the host

                 

                I did this, but still gets the error:

                     App installation failed

                     The host is not paired with the device.

                 

                Good news however, as also explained in this github thread:

                I can go into the Watch app on the phone and manually install the Watch app and then run it (so provisioning etc, should be fine)