Debugging iOS is broken after installation of Xcode 11 Beta

UlrichWUlrichW USMember
edited June 5 in Visual Studio

Well, call me dumb, but I wanted to try Xcode 11 Beta. Since installing it, Visual Studio for Mac (8.0.9 build 5) is no longer able to start my Xamarin Forms app in an iOS simulator.

2019-06-05 11:55:35.865 mlaunch[2728:57607] -[SimDevice registerNotificationHandler:]: unrecognized selector sent to instance 0x7fd2b9131710
Failed to launch the simulator: NSInvalidArgumentException: -[SimDevice registerNotificationHandler:]: unrecognized selector sent to instance 0x7fd2b9131710
error MT1008: Failed to launch the simulator: NSInvalidArgumentException: -[SimDevice registerNotificationHandler:]: unrecognized selector sent to instance 0x7fd2b9131710

It seems like Xcode 11 installed some new simulator (framework), which is not compatible with VS. I already checked the SDK Path in the VS preferences (it's pointing to Xcode 10.2.1) and the command line tools in Xcode (10.2.1). I also removed all Xcode versions (h ttps://stackoverflow.com/a/53575585) and VS completely (h ttps://docs.microsoft.com/de-de/visualstudio/mac/uninstall?view=vsmac-2019) and reinstalled them - but to no avail.

Also tried to recreate the simulators with fastlane snapshot reset_simulators.

Any hint how I could get a working VS back without reinstalling the whole machine?

Regards, Ulrich

PS.: Sorry for the broken links. I'm not yet allowed to post links. :#

Best Answer

  • UlrichWUlrichW US
    Accepted Answer

    JFTR, the Xamarin team is fixing this: h ttps://github.com/xamarin/xamarin-macios/issues/6216. The workaround from there worked for me (using the obviously different App paths and installed the additional components via the Xcode UI instead of the command line).

    The above recommendations of @DandiAndy worked for me too.

    Regards, Ulrich

Answers

  • DandiAndyDandiAndy Member

    Hi @UlrichW,

    I'm having the same issue. It's been quite the fight to get anything to work for me. I haven't been able to outright fix the issue, but I have found a work around to get a simulator to run. Uninstall Xcode 11 and make sure you're back on Xcode 10.2.1 before you begin with your VS mac closed.

    1. Open Xcode
    2. Go to 'Xcode' -> 'Open Developer Tools' -> 'Simulator'
    3. From the Simulator got to 'Hardware' -> 'Device' -> 'Manage Devices...'
    4. Then create a new device ('+' at the bottom left corner. Not sure if the device matters. I've managed to get it running with an IPad Air 2 and IPhone 8.)
    5. Run the device ('Hardware' -> 'Device' -> <etc, etc, select your device>). Keep this running.
    6. Open Visual Studio and debug your newly created simulator.
    7. You should see the application run on the new simulator. If the simulator is killed, try opening it from Xcode again and repeat step 6.

    For some reason, the newly created simulator must be already open from Xcode...

    Hopefully this helps you and the other people unlucky enough to attempt using Xcode 11/iOS 13 with Xamarin.

    Let me know if you get the same results or if I can clarify something.

    Thanks!

    • Andy
  • UlrichWUlrichW USMember
    Accepted Answer

    JFTR, the Xamarin team is fixing this: h ttps://github.com/xamarin/xamarin-macios/issues/6216. The workaround from there worked for me (using the obviously different App paths and installed the additional components via the Xcode UI instead of the command line).

    The above recommendations of @DandiAndy worked for me too.

    Regards, Ulrich

Sign In or Register to comment.