Forum Xamarin.iOS

What is the magic secret to getting a WatchOS application to run?

EasyGoingPatEasyGoingPat GBMember ✭✭✭

I am unable to get my WatchOS application to launch on a physical device. I have followed every guide I can find and can see nothing I am doing wrong.

  • The iPhone and the Watch are properly Provisioned.
  • The iPhone and Watch are paired.
  • The whole solution builds without error on Visual Studio on the PC and from XCode on the Mac.
  • I get no error when I run the application. The iPhone application launches okay but the Watch does nothing at all.

According to this web page https://docs.microsoft.com/en-us/xamarin/ios/watchos/deploy-test/device#testing, the Watch application should simply run if the phone detects it has a paired Watch.

Another web page I found (can't find it in my endless browsing history for this subject) talks about the iPhone application 'referencing' the WatchOS application. What does this mean? How do I do this?

If anyone has managed to get a WatchOS application launching in the debugger, please share any tips you discovered along the way.

Kind wishes ~ Patrick

Tagged:

Best Answer

  • EasyGoingPatEasyGoingPat GBMember ✭✭✭
    Accepted Answer

    I can finally hit a breakpoint on the Apple Watch.

    It seems the final step was so ridiculously small, I can't believe it. I simply needed to set the Watch application as the start-up project. This must be documented somewhere. I am going to assume my ability to read is at fault.

    So the final solution is to do everything I listed in my previous answer and then make sure the WatchOS application is set as the start-up project.

Answers

  • EasyGoingPatEasyGoingPat GBMember ✭✭✭

    I have had a tiny amount of progress with this. I carefully went through the guide about setting up a WatchOS application here https://docs.microsoft.com/en-us/xamarin/ios/watchos/get-started/installation?tabs=vswin (which didn't seem to bear much resemblance to what I actually saw in Visual Studio) and I also double-checked the references between the projects as described here https://docs.microsoft.com/en-us/xamarin/ios/watchos/get-started/project-references?tabs=vsmac.

    Having done all that, I do now get an application icon on the Watch. But it still doesn't appear to run. I see nothing on the screen and I can't hit any breakpoints in the interface controller. Even running the application independently on the watch does not show the display that is set up in my storyboard.

    I tried running the Getting Started Sample (https://developer.xamarin.com/samples/monotouch/WatchKit/GettingStarted/) but it is a similar story with this. It builds and appears to run but I don't get anything at all on the watch.

    I can't be missing much. Can anyone think of anything else I can check?

  • EasyGoingPatEasyGoingPat GBMember ✭✭✭
    Accepted Answer

    I can finally hit a breakpoint on the Apple Watch.

    It seems the final step was so ridiculously small, I can't believe it. I simply needed to set the Watch application as the start-up project. This must be documented somewhere. I am going to assume my ability to read is at fault.

    So the final solution is to do everything I listed in my previous answer and then make sure the WatchOS application is set as the start-up project.

Sign In or Register to comment.