18
votes

Yesterday I updated my Visual Studio and Xcode. Immediately afterward I lost any listing of available iOS simulators for my Xamarin project in Visual Studio. I can plug my iPhone in however and deploy my project onto it just fine, but I'm used to working with Preview in VS and also running a simulator for quicker response.

I'm currently running the following versions:

• Updated to Xcode 11 (11A420a)

• Visual Studio Mac 8.2.6.26

• Mac OS 10.14.6

• iOS 13.0 on iPhone 7+

Now Visual Studio shows the only available simulator as being the Generic Simulator with a hammer, which doesn't launch anything that I can tell. When I look at the list to choose a simulator I see the message line: "Lower the 'Deployment Target' to see older simulators or check your Apple SDK path"

When I launch a test project directly from within Xcode, it offers iPhone 8, 8+, 11, 11 Pro and others as available simulators and those indeed work. In Visual Studio I have changed each Deployment Target from 6.0 to 12.2 and not one of those makes available any simulators.

I'm not sure what the Apple SDK path is about, how to check it and where it needs to be pointing.

Does anyone have any thoughts about what adjustments need to be made to regain my iOS simulators in Visual Studio Mac again after these updates?

Thanks so much :)

13
you need to switch to the XCode 11 channel is VS and updateJason
So I uninstalled Xcode 11, and re-installed it. Launched it and it runs a Hello World app just fine in any of the various simulators. When restarting VS I get a message at the top stating "Xcode is not currently installed or could not be found." Along with a "Download Xcode 11.0 now button." Going to the Channel I have a choice of Xcode 11 Previews which when selected shows only "Up to date" and no options to download any updates. The SDK path is set to "/Library/Frameworks/Xamarin.iOS.framework/Versions/Current". It shows "No SDK found at specified location." Upon looking, they are there.Dan Underhill
I have no idea if this still applies since XCode 11 went GM - docs.microsoft.com/en-us/xamarin/ios/platform/ios13/index. I upgraded XCode this morning but haven't tried Xamarin yet. Hopefully its resolved by MondayJason
Over the last day/hours, I have been checking for updates in all of the various channels in Mac VS and new updates have appeared. After performing every update as I have found them, finally I can resume working with Simulator and Preview and things seem to be working OK now. I'm can preview with all of the various iOS 13 devices such as iPhone 8 and 11.Dan Underhill
@DanUnderhill You can share your workaround in answer , then other people will see solution.Junior Jiang

13 Answers

12
votes

After trying a bunch of suggestions, this simple fix worked for me. First I changed my deployment target in the info.plist from 9.3 to 11. After checking that my Apple SDK path in VS was pointing at Xcode11 and the iOS SDK version on my Mac was 13.0, I simply force quit Visual Studio and Restarted my computer. Then I began to see iPhone8 & iPhone11 simulators. Goodluck.

5
votes

Updating both XCode and Visual Studio for Mac worked for me.

Just updating XCode did not work.

I also fidgeted with the Deployment Target which I believe refreshed the simulators list.

UPDATE: I confirm again that when I go to info.plist and just click on the deployment target drop down, the simulators list gets update. Little funny.

4
votes

Changing the "Minimum System Version" did the trick for me.

Eg. I had 14.4 and I changed it to 14.0 and restart VS the all the simulators appreared.

2
votes

I resolved the issue as well by going under the Visual Studio --> Check for Updates menu and switching the channel to "Xcode 11 Previews". Finally some updates were available and I updated everything normally. I also updated everything in the "Stable" and "Preview" channels as well. Now I have iPhone 8 and iPhone 11 simulators working, however I no longer have any of the other simulators like iPhone 7, etc. like I did before.

2
votes

info.plist has an option called Minimum supported version which says which version of the iOS you are targeting.

in my case it was 10.3 earlier, when i have upgraded xcode (12.4) and vs for mac(8.9.6) to support iOS14. this caused the conflict between the xcode supported iOS version and plist version.

I changed it to 14 in plist for the Minimum supported version and it worked for me. In summary check the xcode supported version and update the minimum supported version accordingly

2
votes

Same here, just need to change 'Minimum system version' on your info.plist file in my case was 12.0 and then updated to 12.1 and vualaaaaa the simulator list refresh it.

2
votes

Ran into this issue many times for the last updates. Nothing really helped, until I came across a Microsoft forum where someone mentioned the Apple SDK path needs a trailing slash, which is not added when using the Browse button to navigate to the Apple SDK Location.

So when using Visual Studio for Mac, navigate to Visual Studio -> Preferences -> Projects -> SDK Locations -> Apple and please note your Apple SDK Location should be something like:

/Applications/Xcode.app/

rather than

/Applications/Xcode.app

1
votes

After updating Xcode via the app store, restart your machine. The simulators should reappear.

UPDATE

This didn't work for me after the latest update. However, setting the startup project to Android, then switching back to iOS was enough to repopulate the list for me after restarting my machine.

0
votes

I had the same problem when the iOS 14 updates were first installed. I had already installed both XCode and VS updates. What I did is: I restarted the Mac and I had to install the XCode Command-line tools from VS separately. Then the simulators were visible.

0
votes

What always works for me is connecting an iPhone device. After I connect it, the simulators appear. I guess connecting a physical device also refreshes the simulators list.

0
votes

This time, nothing was working for me, until I deleted /Library/Caches/Xamarin/XMA and /Library/Caches/Xamarin/mtbs and restarted VS. That helped.

0
votes

Here's the actual solution if updating everything else still doesn't work. Open terminal, type in "instruments -s devices" to see a list of all the installed simulators.

In your info.plist set "Minimum System Version" to match the lowest simulator version you have installed.

0
votes

After plugging in my physical phone with the usb cable, the list of simulator devices appeared in like 2 seconds... Before plugging in my phone, only the generic simulator and my phone were shown as deployment options