0

So, according to this this should be the bundle ids of my app:

  • iPhone app: com.fruitcompany.orange
  • Watchkit app: com.fruitcompany.orange.watchkit
  • Watchkit extension: com.fruitcompany.orange.watchkit.extension

and then I just have to set the WKCompanionAppBundleIdentifier of the Watchkit app to com.fruitcompany.orange to the watch app is linked to its companion app.

That's fine.

My problem is the iPhone version was done in Xamarin. And for the Watch we are developing it natively in Xcode. To create this project I followed this instructions. The WatchKit app and Extension are wrapped in a stub application that's only used to be able to upload the app to AppStore Connect.

But this stub app needs its own bundle id, and the WatchKit app and Extension bundle ids need to be derived from it (as far as I understand)

So if the stub's bundle id is: com.fruitcompany.orange.watchwrapper then the WatchKit app needs to be com.fruitcompany.orange.watchwrapper.watchkit and the extension com.fruitcompany.orange.watchwrapper.watchkit.extension.

The problem with this is, if I set WKCompanionAppBundleIdentifier to be com.fruitcompany.orange (the Xamarin app), App Store Connect complains it's not correct, because it should be com.fruitcompany.orange.watchwrapper the empty wrapper app.

I'm trying to communicate between my watch app and my iPhone app using the Watch Connectivity framework, and for that I, apparently, the iPhone app needs to be set and the watch app companion.

Is there a solution for this or am I out of luck? Is there a workaround? My main purpose for now is being able to share sign in credentials.

Odrakir
  • 4,254
  • 1
  • 20
  • 52
  • You will need to bring the Xamarin binary and the watch app binary together into the same bundle so that you can deliver a single bundle containing the WatchKit app and the companion app. I don't use xamarin so I can't tell you the exact steps required, but it should be possible. The app bundle is basically just a zip file. – Paulw11 Dec 18 '19 at 19:03
  • This answer seems to go along those lines. It looks painful though... and also a challenge to do it in the CI server. https://xamarin.github.io/bugzilla-archives/43/43985/bug.html#c12 – Odrakir Dec 18 '19 at 21:24
  • Yep, that was the sort of process I was thinking of. – Paulw11 Dec 18 '19 at 21:26

0 Answers0