Forum Xamarin.iOS

Deploying a WatchKit app to a Watch

NicolasTremblayNicolasTremblay USMember
edited July 2018 in Xamarin.iOS

Hi,

I'm adding a WatchKit app to my iOS app and I'm having problems making the watch app installing automatically when I change the app extension code. For now, the only way to update my watch app, is to delete it on the watch directly and re-install it from the Watch app on my iPhone. No need to say that using this method I can't connect the debugger to help me out during the development process.

When compiling, the Device Log and the Deploying to Device tabs says nothing about the Watch app, which I find suspicious. The Build Output, however, seems to build my watch app target (Target _CopyWatchOS2AppsToBundle:) without errors.

While reading my iPhone logs in the Console.app, I found something interesting :

0x16cea3000 -[ACXAvailableApplicationManager processApplication:withNewApps:updatedApps:]: Updating entry for app com.mycompany.myiosapp.watchkitapp

0x16cea3000 -[ACXGizmoState noteNewApps:updatedApps:removedApps:completion:]: com.mycompany.myiosapp.watchkitapp: updated but marked to skip watch install so skipping.

The app seems to be updated correctly, but is not send to my watch.

My provisioning profiles seems to be correctly generated and installed.

Is anyone encountered this already?

Thank you,
Nicolas

Answers

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    @NicolasTremblay

    You are trying this with the Watch app (not the watch extension) project set as the startup project?

  • NicolasTremblayNicolasTremblay USMember

    @JGoldberger No, I'm building a watch extension for an already existing iOS app.

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    @NicolasTremblay said:
    @JGoldberger No, I'm building a watch extension for an already existing iOS app.

    So your solution should have at least three projects:

    1. The iPhone parent app project
    2. The watch extension project
    3. The Watch app project

    Set the Watch app project as the startup project. not the extension project.

    And please go over this guide if you have not: https://docs.microsoft.com/en-us/xamarin/ios/watchos/deploy-test/device

    and note the issue I filed against that document: https://github.com/MicrosoftDocs/xamarin-docs/issues/480

    Testing on a Watch device

    Once you have configured your Device, App IDs, and Provisioning Profiles, you are ready to test.

    1. Make sure your iPhone is plugged in, and the Watch is already paired with the iPhone.
    2. Ensure the configuration is set to Debug or Debug | iPhone (if available) or Release (if you do not want to debug)
    3. Right-click on the watch project and choose Set As Startup Project.
    4. Ensure the connected Watch device is selected in the target list.
    5. Click the Run button (or choose a Start option from the Run menu).
    6. The solution will build and the iOS app will be deployed to the iPhone and the watch app will be deployed to the watch (this can be very slow). If the iOS app or watch extension provisioning is not set correctly then deployment to the iPhone will fail.
    7. You need to keep the watch awake until the watch app starts.
    8. If deployment completes successfully, your app icon will appear on the watch screen with a circular installing progress indicator.
    9. If the watch app is successfully installed, the watch app should launch and you can start debugging (if Debug configuration was selected).
Sign In or Register to comment.