25

I am trying to use the Xamarin iOS simulator but it fails on launch with a "The device {guid} was not found".

I have my environment settings like...

enter image description here

and when I run I see...

enter image description here

then...

enter image description here

researching the error, the recommendation is to explicitly set the XCode path which I have done, but I get the same error. Also, notice I am connected to our build Mac.

enter image description here

I have a coworker connected to the same Mac with the same computer and VS version I am on, and his iOS simulator works fine. I have uninstalled/reinstalled the simulator and restarted Visual Studio (2017RC).

I appreciate any pointers someone might have!

UPDATE

I reinstalled my Windows 10 OS thinking I had a corrupt install. Unfortunately on a clean machine with 2017RC, the simulator still fails in the same way as I described above.

John Livermore
  • 30,235
  • 44
  • 126
  • 216

9 Answers9

21

In my case: UnCheck Remote Simulator to Windows In my case: UnCheck Remote Simulator to Windows

Jin Lee
  • 3,194
  • 12
  • 46
  • 86
  • @JinLee This is not a link! It's an image at i.stack.imgur. Try hovering over it, please. It shows where to "UnCheck Remote Simulator to Windows", which in itself is an Answer . – Scratte Mar 20 '21 at 22:55
  • 1
    THANKS, this workaround works! (VS 16.9.5 + xcode 12.5) – Zoli May 17 '21 at 11:42
  • 1
    Many thanks, works fine after unchecked this. VS 15.9.36 and Xcode 12.5 – technik May 23 '21 at 00:03
  • 2
    this is opening the simulator inside mac which makes no sense :D whole purpose is to debug on windows with remote connection. – Emil Jun 20 '21 at 15:23
  • This is fixed and released by Microsoft. Please update your Visual Studio. https://developercommunity2.visualstudio.com/t/VS-2019-1694-cannot-connect-to-iOS-Sim/1412563#TPIN-N1480635 – MilanG Jul 22 '21 at 10:51
13

I am facing the same issue from last two days and solved this as well by removing the latest version of XCode 12.5. Download the previous version of code i.e 12.4 from apple site and install Move the downloaded xcode file in application and check on windows It works fine Latest version of XCode 12.5 is not stable

Akash kumar
  • 131
  • 1
  • 2
  • I have the same problem since updating XCode to version 12.5. Do you know how to get information back to Microsoft? – Jean-Daniel Gasser May 06 '21 at 06:00
  • Thanks Akash, this solved my issue. I had basically given up after updating everything didn't work on both Mac and Windows. – Ken May 11 '21 at 14:35
  • 1
    Just released today Visual Studio 2019 version 16.9.5 - "Added Xcode 12.5 Support" https://learn.microsoft.com/en-us/visualstudio/releases/2019/release-notes#16.9.5 – Ken May 11 '21 at 21:28
  • 2
    I just installed the 16.9.5 but it is not fixing the issue. I used the unchecked remote simulator to make it working for now. I hope to have a fix to this issue soon. – Jerome2606 May 14 '21 at 13:25
  • Me too, VS 16.9.5, after upgrading to xcode 12.5 -> same issue. – Zoli May 17 '21 at 11:34
  • EDIT: THANKS, the workaround (switch off "Remote Simulator to Windows") works!! – Zoli May 17 '21 at 11:41
  • *sigh* Downgrading xCode is no longer an option now that VS 16.10 requires xCode 12.5. :( – Cameron MacFarland Jun 17 '21 at 05:54
  • Anyone tried XCode 13 yet? This bug is supposedly been fixed in VS 2019 v16.11 (see [bug report](https://developercommunity2.visualstudio.com/t/VS-2019-1694-cannot-connect-to-iOS-Sim/1412563)). I will give it a shot later today. – Michal Diviš Nov 04 '21 at 10:07
11

I confirm the issue is currently (May 2021) caused by Xcode 12.5 upgrade. After I downgraded back to Xcode 12.4, the simulators started to work again with no problem.

I tried to upgrade Visual Studio for Windows to latest version 16.9.4, did not help. I launched Visual Studio Installer to reinstall Xamarin, did not help either.

Only when I removed Xcode 12.5 (using this shell script https://onexlab-io.medium.com/uninstall-xcode-from-macos-eca1b69dc836) and installed version 12.4 (from XIP archive from here How to download Xcode DMG or XIP file?) it started to work.

7

You may need to uncheck "Remote Simulator to Windows." I just fixed this issue for myself by doing so. However, I was trying to launch on the iOS simulator on my Mac side (running Windows vm via Parallels). It seems you might be trying to launch the simulator in windows.

  • When working in Visual Studio on a Windows machine this does allow you to run the simulator on a Mac, but it means you can no longer see the simulator on the Windows machine and turning it back on causes the error to come back. – Tom Bowen Jan 19 '18 at 15:22
  • 1
    This is under VS > Tools > Options... > Xamarin > iOS Settings to save others the Googling that I had to do. (That's because I'm not the best at reading the images above...) Updating to the current version of VS 2019 (16.2.0) resulted in this showing up for my running in the simulator. – user01CU812 Aug 02 '19 at 21:30
  • I have the same issue and in my case it also helped to no use the remote simulator in Windows. Instead I am using the Ssmulator on the MacBook which is also fine for the moment. I am connecting with RealVNC to the MacBook in order to get access ot the simulator. But it would be really nice to use the "Remote Windows Simulator" too. VS 2019 16.10.3 XCode 12.5.1 – Thomas Purrer Jul 13 '21 at 07:46
3

If you need a quick solution, downgrade the version of VS and Xcode, for me this works:

  • VS 2019 - 16.9.3
  • Xcode - 12.4
  • Xamarin.iOS - 14.14.2.5

And for physical devices make sure Hot Restart is not enabled in Tools > Options > Xamarin > iOS settings

2

Just had the same problem after upgrading mac to Big Sur and Xcode 12.5 yesterday. Reboots and deleting obj/bin/.vs folders made no difference. The fix was to explicitly type the Xcode path into Xamarin options iOS settings - even though it was the default - untick Remote Simulator to Windows then pair/connect to mac from that options dialog. After closing the dialog and reopening it Remote Simulator was checked again. I unchecked it, closed the dialog and reopened it to check again - it was closed this time. All works fine now.

I also ran mac VS and let it update in the midst of all this.

Trebus
  • 21
  • 2
  • Thanks, this worked to at least get the emulator running on the mac screen. (not yet on the windows emulator). I disabled the 'Remote Simualtro to Windows' ..... and what did the trick is UNcheck the 'Use default Xcode path'.... while the default path stayed the same, it worked for '/Applications/Xcode.app' – Toine db May 17 '21 at 08:09
1

I have the same issue since yesterday, to resolve that I uninstall the "Xamarin iOS simulator" and now it works...

it may be a solution for your issue!

Vincent T.
  • 33
  • 2
1

Did you resolved the issue already?

I bumped onto the same issue today. I tried opening Xcode on Mac and it says it need to install additional tools. I let it install and try open/quit Visual Studio for Mac, Xcode, Simulator again (not sure if it is related)

Now to remote simulator works fine again.

anuith
  • 659
  • 5
  • 16
0

I had the same issue and i resolved it by realizing that my PC with VS was on a different network than my Mac with Xcode. Once i put both machines on the same network the issue went away. Hope it helps.

npineda
  • 61
  • 5