Tisha Anand
Tisha Anand

Reputation: 319

Xamarin Forms WatchOS main iOS app couldn’t be found

I am trying to create a watchOS app in an existing Xamarin Forms application in Visual Studio 2017 on Windows. I have followed all the steps listed here. I have also added watchOS app project reference to the main iOS app by selecting add reference option of the references node of the main iOS app. Solution also builds successfully but when I try to launch watchOS app in watch simulator, it instantly throws the below error without even launching the simulator.

Error: Main iOS app couldn't be found, please make sure you've created an iOS app and it is referencing

Please suggest what I am doing wrong.

Upvotes: 1

Views: 728

Answers (1)

nevermore
nevermore

Reputation: 15806

I think you have add the watchOS app reference in a wrong place.

You should add the reference in xxx.iOS projecct instead of xxx(xamarin.forms project).

Let me show a screenshot for you:

reference

Update:

Steps:

  1. I create a new MobileApp(Xamarin.forms) project(platform iOS).

  2. Right click on the solution -->add --> new project -->Apple Watch -->watchOS app-->ok.

  3. Right click on the xxx.iOS project --> add---> reference --> check XXX.watchOSApp

    refer

  4. Right click on the xxx.WatchOSApp --> Set as Setup Project.

  5. (Clean and rebuild) Run on the appleWatch simulator.

Upvotes: 1

Related Questions