Reputation: 319
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
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:
Update:
Steps:
I create a new MobileApp(Xamarin.forms)
project(platform iOS
).
Right click on the solution -->add --> new project -->Apple Watch -->watchOS app-->ok.
Right click on the xxx.iOS project
--> add---> reference --> check XXX.watchOSApp
Right click on the xxx.WatchOSApp --> Set as Setup Project
.
appleWatch
simulator.Upvotes: 1