Multiple iOS remote simulators to same Mac


I'm trying to connect multiple iOS simulators from Windows to the same Mac Mini in the network. The problem I'm encountering, is that once I connect a new simulator, the previous simulator just freezes. Application interaction is not possible, home button is not working... My guess is that currently, only one connection at a time is possible. Is this something that can/will be fixed in the future?

Background story: we're looking to expand our Xamarin development team, and we're investigating how we can expand our tools. Currently, we are thinking about setting up a Mac Mini in each of our development rooms, with which we can connect to using the remote simulators, and if necessary connect some devices to it. But this won't work if only one simulator can be connected at the same time.


  • JohnHJohnH GBMember ✭✭✭✭✭

    Im not sure if this is possible. If you log in directly on the mac, can you launch multiple simulators? (I dont think you can)
    Or how about logging in to the mac with multiple users, can you run the simulator in each session? That is the only way I can think that this might actually be possible.

  • Hey John
    When launching a second simulator on the Mac, the first one is closed automatically.

    I don't think the second possibility will work: I've already tried to add multiple users, but the remote simulator can only connect to the user that is currently logged in.

  • JohnHJohnH GBMember ✭✭✭✭✭
    edited October 2016

    You can have multiple users logged in to the Mac at the same time, but if they can all run the simulator (or XCode in fact) at the same time is unlikely, however.

  • JimBennettJimBennett GBXamarin Team, Insider, University, Developer Group Leader ✭✭✭✭

    Apple has a tool called Instruments that runs the debugging session through the simulator/device. You can only run one instance of Instruments at a time per user, which means only one simulator or one device at a time.

    This is the same if you are running the simulator on the mac natively or shared back to the PC through the VS simulator.

    There's no way round it. You can run multiple simulators at the same time by having multiple user accounts and running one simulator per user (we use this to run multiple UI tests at the same time in a CI build) but you can't do this from VS as it uses one ssh connection to the mac to do everything.

    It's a shame, but it's an Apple limitation so not easy for Xamarin to work around, and I don't know how many people would want it enough for them to spend time allowing multiple mac connections. You could request it on the user voice though:

  • Hey John and Jim, thanks for the input!

    Indeed, it's quite a shame. We'll need to find another way then.

  • JimBennettJimBennett GBXamarin Team, Insider, University, Developer Group Leader ✭✭✭✭

    Just re-read your question - sorry, did't read it fully the first time.

    If your plan is multiple Xamarin developers using windows boxes with a single Mac then you can do it. Have multiple accounts on the Mac, log them all in from the Mac by switching user, then each developer ssh's in to the Mac using a different Mac user. You'll need to set up Xamarin/Android SDK for each user on the Mac, but it will work

  • Oh great, thanks for re-reading! I'll give it a shot as soon as I can and let you know.

  • Hey Jim

    Unfortunately, my new attempts didn't work either.
    Just to be clear: I don't want any Windows VM's running on the Mac, the machine are stand-alone desktops or laptops.
    I created 2 different accounts on the Mac, one for each of the Windows machines connecting through Visual Studio. Then I started one iOS simulator on Windows, everything went fine. When starting the iOS simulator on the other Windows machine (that is logged in as another user than the first machine), it's giving me the same error message as when I was connecting to the same user (device can't be found on the second machine, iOS simulator on the first machine throws a dialog that the app with ID ... can't be installed). This is probably because the same port is still used?

    I also tried running the iOS simulator on Windows on one machine, and use the Mac simulator for the other machine. That went just fine.

  • michelpintomichelpinto PTMember

    Hi YvesDelcoigne,

    I am facing the exact behavior you described. Do you found any solution? Or anyone knows a solution?

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    Unfortunately, there is currently no solution. You cannot run more than one instance of the simulator for the same device. You can have, for example, an iPad 2 instance and an iPad Retina instance, but that won't help either. All simulator instances listen to the same events, so they would all attempt to respond to whatever events were coming in at the same time. User A and User B would both be attempting to send commands to both simulator instances and chaos would reign.

    There are a few workarounds on the net, each with varying degrees of success and involve mucking with info.plists inside Xcode-related .app files, wrapper scripts, etc. The more successful of them are not free, nor would they work with Xamarin, nor are they "sanctioned" by Apple. Apple can change Xcode any time they want, thus breaking whatever workarounds are put in place.

    The limitation is with the Apple simulators, not with Xamarin. Best just to wait until Apple decides to make this use-case work.

  • michelpintomichelpinto PTMember
    edited February 2017

    Thank you very much DaveHunt.

    I followed the idea in the article bellow

    And I am expecting that having a user account in mac for every developer in the team will fix that particular issue.

    So, if I understood correctly, the emulators do not run under the mac user account I connected in Xamarin Mac Agent but under the system?

  • DaveHuntDaveHunt USMember ✭✭✭✭✭
    edited February 2017

    No, they run under whatever user(s) starts them. The problem appears to be the system events used to communicate with the simulators. It's possible that changes on the Apple side have made workarounds more reliable. Or maybe the new way Xamarin connects, coupled with VNC, works around the problem. But it's still not an officially supported (by Apple) setup.

    I'm not saying don't do it. If it works for you, great! Share it with the community. It's just that Apple has a tendency to make changes that can potentially break whatever workaround you find. They don't seem to be intentionally preventing this use-case. They just don't seem to be interested in officially supporting it.

  • michelpintomichelpinto PTMember

    Thanks again DavidHunt, now I get the idea. Ok, I will see the best option then.

    If in the meantime I make it work I will put it here for everyone with the same issue have something to follow.

  • godofredgodofred Member ✭✭

    Any news on this matter?

  • RandyGuayRandyGuay USMember ✭✭
    edited June 2018

    I am finding that the simulator is too slow to be useful. I launched an app and it's still sitting there 10 minutes later.

    I am teaching Xamarin to a group of around 15 community college students. Currently we are using Live Player, but as you know many things don't work on it.

    Instead of using multiple simulators, I would like to deploy to multiple iPhones using a single Mac, with numerous Windows 10 boxes. Each Windows developer would have their own iPhone. However, the only way to find out whether this works is to become an Apple developer. This involves having the school president fill out paperwork for Apple. I'd rather not go through the hassle if I can't use a single Mac with multiple developers.

    Does anyone know whether you can deploy to multiple physical devices from a single Mac?

  • JohnHJohnH GBMember ✭✭✭✭✭

    Multiple devices from the same Mac, yes but not at the same time. They need to be added to the same provisioning profile of course.
    You cannot however have multiple developers using the Mac from VS on Windows at the same time.

  • RandyGuayRandyGuay USMember ✭✭

    Or would it be possible to set up 4 VMs and run them to do the deploys?

  • LKdevLKdev Member ✭✭

    @JohnH @RandyGuay @DaveHunt @JimBennett

    Has anyone figured out a viable solution here?

    I haven't used it yet, but would the Apple "Server" app give us any additional functionality that would make this possible? I'm unfamiliar with the functionality it adds.

    (I'm curious about the multiple Windows users - connecting to single mac - under their own user accounts - viewing simulators via the "remote simulator to windows" option)

  • RandyGuayRandyGuay USMember ✭✭

    @ikdev, the latest VS 15.x allows the simulator to run on the developer's Windows box. I haven't tried multiple logons, but if you take turns the Windows simulator should keep running after another user acquires the Mac.

  • LKdevLKdev Member ✭✭
    edited July 3

    @RandyGuay Yea the multi-user scenario is more what I'm looking for. The only way I've found to effectively "take turns" is if each user logs their account out of the Mac when they're done. Only then can other users can log in and connect / deploy to a remote sim in Windows.

    The way I see things working, 2 users cannot deploy apps to simulators (which are remoted to separate Win machines), at the same time.

    That's what I'm wanting to accomplish though :disappointed:

    Thank you for your reply Randy. If anyone else has info please let me know.

  • HelpHelp Member

    We are running into the same issue that @LKdev is trying to figure out. Surely somebody has figured this out. Please help!

  • LKdevLKdev Member ✭✭

    Hi @Help (and others interested)... after a lot of research we've finally come to terms with how all of this works. I'll summarize below:

    Our context: Single Mac Mini with multiple user accounts, remote access enabled on all. Mac Mini is connected to an internal network, and visible to all others on that network via IP. Each developer has their own Windows PC which we then wanted to be able to connect to the Mac Mini, via Visual Studio "Pair to Mac", using the user account credentials created for each developer.

    We were HOPING that 2 or more developers would be able to connect (at the same time) and build / deploy to simulators without interfering with each other. But that's not possible as of my knowledge today.

    Why is it not possible? Because if you have 2 users connected, the first user who deploys to a simulator will work fine, but anyone who follows will get an error stating that the simulator "cannot be found" or some similar error. Once the simulator is locked to "User 1" in this way, the only way to then free up the simulator for other user accounts, is for "User 1" to completely log out of their Mac session (via remote desktop, go to the apple icon in the top left and log out).

    We've settled with this as a solution for now. We've agreed with each other that we will log out when we're done, and coordinate within the group to make sure we're not stepping on each other.

    If anyone else has questions I can help with, feel free to ping me.

  • NMackayNMackay GBInsider, University mod


    Thanks for sharing, it's Apple's evil plan to shift Macmini's.

    No idea why this post was caught as spam.

Sign In or Register to comment.