xamarinxamarin.formsxamarin-studio

Can't run a Xamarin App in iPhone Simulator from Visual Studio For Mac


In short: I am unable to run my app in the iPhone Simulator. There is no "Play button" (the triangle), only a Debugger button (hammer):

enter image description here

As you can see above I have "Generic Simulator". When I click on it, there is no list of various iPhones/iPads to choose from: enter image description here

If I choose Android, I am able to run the app:

enter image description here

I have XCode installed. I ran XCode once. I also installed the Command Line tools. enter image description here

I created a new Xamarin Forms App: enter image description here enter image description here Here are my iOS build options: enter image description here

I am able to run the Simulator separately:

enter image description here

Creating an App in XCode and running in the Simulator works: enter image description here

info.plist: enter image description here

Prefrences -> SDK Locations -> Apple enter image description here

Build -> Configurations: enter image description here enter image description here

Here is the kicker though. If I run a Xamarin App on my Windows machine using the iPhone Simulator on the Mac, it works! enter image description here What do I need to do so I can run my app inside the Simulator vis Visual Studio for Mac?


Solution

  • Few options you can worth to check. @WorldOfBasti suggested options plus following.

    1. Configuration

    Right click on the solution -> options -> Configurations -> Configuration manager -> ProjectName.iOS with Debug|iPhoneSimulator should be checked or if configuration "ProjectName.iOS with Debug|iPhoneSimulator" is not available then add this from General tab

    enter image description here

    1. Apple SDK path

    Check Apple SDK path is set properly (Preference -> SDK Location -> Apple). It should have green tick mark with Xcode version and SDK path location. enter image description here

    1. Minimum system version (Deployment Target)

    Change Deployment Target to minimum version (ie, lower than your simulator version)

    1. Switch debug <-> release

    Today I have also faced same issue which you are facing. I have switched debug to release, iOS to Android. Then reverted back to iOS and debug from the top device selection status bar. Then Simulator option was appearing. So, might be UI updated issue in Visual studio for mac. Please give a try.

    enter image description here