Xamarin-macios: [Feature] Native WatchOS app support

Created on 7 Nov 2020  路  1Comment  路  Source: xamarin/xamarin-macios

It would be great to be able to include native SwiftUI watchOS app in Xamarin.iOS project. Similarly to extensions (AdditionalAppExtensions).

For now, I think it is possible by pasting manually the Watch folder from the built native project into xcarchive created by Visual Studio.

It would be great to have it integrated.

enhancement iOS

Most helpful comment

I successfully managed to add native watchOS to my Xamarin xcarchive and publish it on App Store.

Instruction:

  1. Archive Xamarin project
  2. Archive native watchOS project (make sure that versions, bundle id, profiles and sdk match Xamarin project).
  3. Copy dsyms, WatchKitSupport2 folder and Products/Applications/xxx.app/Watch folder from native xcarchive into Xamarin's xcarchive.

I had sometimes problems with connectivity on the simulator, not sure why, but it helped to add to Xamarin watchOS project (it's later anyway replaced in xcarchive by native one).

Steps to run it on simulator and fix connectivity issues:

  • Run iPhone and Apple Watch simulator
  • Open Watch app on iPhone, let it sync
  • Run Xamarin project
  • Kill app (detach debugger)
  • Install watchOS app using xcrun simctl install booted WatchApp.app (from native DerivedData folder Build/Products/Debug-watchsimulator)

For some reason, connection with Apple Watch doesn't work when you are running app using VS debugger.

>All comments

I successfully managed to add native watchOS to my Xamarin xcarchive and publish it on App Store.

Instruction:

  1. Archive Xamarin project
  2. Archive native watchOS project (make sure that versions, bundle id, profiles and sdk match Xamarin project).
  3. Copy dsyms, WatchKitSupport2 folder and Products/Applications/xxx.app/Watch folder from native xcarchive into Xamarin's xcarchive.

I had sometimes problems with connectivity on the simulator, not sure why, but it helped to add to Xamarin watchOS project (it's later anyway replaced in xcarchive by native one).

Steps to run it on simulator and fix connectivity issues:

  • Run iPhone and Apple Watch simulator
  • Open Watch app on iPhone, let it sync
  • Run Xamarin project
  • Kill app (detach debugger)
  • Install watchOS app using xcrun simctl install booted WatchApp.app (from native DerivedData folder Build/Products/Debug-watchsimulator)

For some reason, connection with Apple Watch doesn't work when you are running app using VS debugger.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whitneyschmidt picture whitneyschmidt  路  3Comments

parmjitv picture parmjitv  路  4Comments

nickmask picture nickmask  路  3Comments

therealjohn picture therealjohn  路  3Comments

sharmashiv picture sharmashiv  路  4Comments