iOS simulator display on Windows

MarcoSeraphinMarcoSeraphin DEMember, University

Hi all,

I have a customer using Xamarin.Business on Windows with VisualStudio creating an iOS app. Additionally they have a Mac with the Xamarin Build host running in their network. So far so good.
If they start the app the iOS simulator opens on the Mac based on Xcode.
How do the see the iOS emulator ? Just using TeamViewer or any other Screen Sharing software on the Mac and using the client on the Windows machine or does anyone know or better alternative just displaying the iOS simulator on the Windows screen (like using Reflactor with a physical device) ??

(I am using VisualStudio in a Parallels VM on the Mac, so the VisualStudio/Windows and the iOS simulator are on the same screen)

Thanx for any suggestion...

Marco

Best Answer

«1

Answers

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

    Is the mac shared or personal? My setup has a windows box for development and a macbook Pro as a build server and I use the macbook's screen as a second monitor using ShareMouse - so the simulator runs on the mac but I use the same keyboard/mouse for both computers.

    Doesn't work if the mac is in a server room somewhere but will if it's on the developers desk.

  • MarcoSeraphinMarcoSeraphin DEMember, University

    Hi Jim,

    yes that's the point. In case of my customer the Mac was more or less in the server room. So screen sharing like VNC or TeamViewer seems to be the only solution. Or do you know a tool that just mirroring the simulator screen to Windows ?

    Thanx

    Marco

  • nprokopicnprokopic RSMember ✭✭

    Check out this post from Miguel de Icaza.

    The part related to iOS simulator on Windows:

    iOS Simulator Remoting

    Our iOS Simulator remoting enables you to interact with apps running in Apple’s iOS Simulator running on a Mac as though the simulator were running locally. Even multi-touch interactions are supported on Windows machines with touch capable screens, so you can interact with your app just as a user would by tapping, pinching, or swiping your touchscreen display—things that could previously only be tested on physical devices. The simulator also supports all the features you would expect such as device rotation, taking a screenshot, and even simulating location changes.

    iOS USB Remoting

    Debugging on simulators is a great start, but there is really no substitute for testing on physical devices. Today, we previewed support for iOS USB remoting which makes it possible to deploy and debug apps from Visual Studio to an iOS device plugged into your Windows PC. Simply connect your device to a Windows 10 machine via USB, select the device to deploy to, and debug your app on an iOS device without ever having to leave Windows.

    You can download the previews for both iOS Simulator remoting and iOS USB remoting by switching to the Xamarin alpha release channel in Visual Studio.

  • AdamHillAdamHill USBeta ✭✭

    I've updated Alpha, how do we turn it on?

    Not in Tools -> Options. Not in the iOS Toolbar.

    Same for USB remoting.

  • AlanMcGovernAlanMcGovern USXamarin Team Xamurai

    https://developer.xamarin.com/guides/cross-platform/windows/ios-simulator/

    If you have any issues with the simulator please do let us know, including if it completely fails to show up. Bear in mind that you do need alpha builds of all the tools before the option to use the remoted ios simulator shows up. If you can't even see the option then the odds are high that it's an old build.

  • AdamHillAdamHill USBeta ✭✭

    I am on Alpha. I installed Simulator.Installer.0.9.0.25. I now see the checkbox in Tools->Xamarin->iOS. But building to the simulator with it checked goes orange in VS, like it should but no Simulator visible on the PC.

    I did try the trick suggested on SO of disabling Remote, deploying the app to the Sim normally. Then re-enabling it. No luck. The logs via VS->Help, don't seem to have any helpful errors.

  • KipperDevKipperDev GBMember ✭✭

    Tried out the remote simulator and it didn't work. I just see 'Launching Application for debugging ...' at the bottom of dev studio when I try debugging and nothing shows up on my macbook. If I turn off the 'remote simulator to windows' option, everything works as expected. I'm running both devstudio and Xamarin studio on the alpha channels, my devstudio is vs2015 community update 2 and my PC is running Windows 10.

  • DaveYDaveY USUniversity ✭✭

    I have the same issue, where I do not see the ios simulator with all the latest alpha bits on both windows and mac. No messages or errors just not simulator. I also tried the 'trick' of disabling and re-enabling but still nothing yet. I need another trick to get this working.
    ideas?

  • tweitztweitz USMember ✭✭

    Having the same results, if I uncheck the iOS simulator shows on the Mac with the Windows VS going orange for debug. If I check to use iOS Simulator on Windows and try to run debug the VS window goes orange but no simulator window on Mac or Windows. On Alpha channel for both, installed all updates and installed the iOS simulator .msi.

  • dstarnesdstarnes USMember ✭✭

    I'm having the same results but according to the docs you have to be running the beta channel. I've tried it on both and also tried deploying to the Mac and then reenabling remoting but nothing new. Has anyone filed a bug for this yet?

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭
    edited May 2016

    Just an observation:

    • When I connect to my Mac Build host locally using the IP address or network name ("myMac.local") I can connect, build and the iOS simulator launches on my Windows machine. It is a different instance of the simulator than is running on the Mac. {Took a screen capture of my PC to prove it}
    • When I connect to the same Mac, but through dynamic DNS (DDNS) I can still connect and build, but the Windows simulator doesn't launch. Also at that point I'm kinda fraked for going back to using the local connection until I relaunch Visual Studio.

    __Connecting using the IP address instead of the network name is consistently more reliable however. __
    About 50% of the time using the network name fails or gets squirrely

    UPDATE: Once it failed... It continues to fail to launch, showing the same orange status bar but never launching the simulator on Windows.

    <

    ul>
    I turned off Windows remote simulator
    Built again using the Mac simulator - successful
    Turned on Windows remote simulator
    Debugged again - Failed to launch Windows iOS simulator
    Changed simulator choice from iPadAir2/9.3 to iPadAir2/9.1 then sent it to debug. This forced a package restore really fast and a couple other steps that flashed by rapidly. Again, orange status bar but failed to launch Simulator.
    Went to the solution directory and deleted the 'bin' and 'obj' directories from the iOS project.
    Clean and rebuild solution.
    Debug
    Orange status bar, no iOS simulator
    Assume it is slow and waited... - No Joy

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭
    edited May 2016

    Just an observation:

    • When I connect to my Mac Build host locally using the IP address or network name ("myMac.local") I can connect, build and the iOS simulator launches on my Windows machine. It is a different instance of the simulator than is running on the Mac. {Took a screen capture of my PC to prove it}
    • When I connect to the same Mac, but through dynamic DNS (DDNS) I can still connect and build, but the Windows simulator doesn't launch. Also at that point I'm kinda fraked for going back to using the local connection until I relaunch Visual Studio.

    __Connecting using the IP address instead of the network name is consistently more reliable however. __
    About 50% of the time using the network name fails or gets squirrely

    UPDATE: Once it failed... It continues to fail to launch, showing the same orange status bar but never launching the simulator on Windows.

    • I turned off Windows remote simulator
    • Built again using the Mac simulator - successful
    • Turned on Windows remote simulator
    • Debugged again - Failed to launch Windows iOS simulator
    • Changed simulator choice from iPadAir2/9.3 to iPadAir2/9.1 then sent it to debug. This forced a package restore really fast and a couple other steps that flashed by rapidly. Again, orange status bar but failed to launch Simulator.
    • Went to the solution directory and deleted the 'bin' and 'obj' directories from the iOS project.
    • Clean and rebuild solution.
    • Debug
    • Orange status bar, no iOS simulator
    • Assume it is slow and waited... - No Joy
    • Shut down the mac. Shutdown the PC
    • Boot mac fully. THEN Boot PC fully
    • From VS connect to Mac by IP address
    • Debug to iPad2Air/9.1 - It launched the simulator but failed to actually boot the simulated iPad iOS
    • Close the simulator. Tried relaunching with 9.3 - Simulator doesn't launch at all.
    • Disconnect from Mac, reconnect to Mac
    • Debug to simulator - Never launches
    • This time lets try just rebooting the Mac.
    • Close VS
    • Reboot the mac
    • Relaunch Visual Studio; load the solution & reconnect to the refreshed Mac by local IP address
  • EricMaupinEricMaupin USXamarin Team Xamurai

    Hi everyone,

    Can you check C:\Users\<user>\AppData\Local\Xamarin\Logs\Xamarin.Simulator for logs? (If you go to Help -> Open logs, it's up a directory from there.) Additionally on your mac: ~/Library/Logs/Xamarin/Simulator.Server

    UPDATE: Once it failed... It continues to fail to launch, showing the same orange status bar but never launching the simulator on Windows.

    See if Xamarin.Simulator.exe is still running on your windows machine, kill it and try again.

  • CNicolasCNicolas FRUniversity ✭✭

    @Eric.Maupin said:
    Hi everyone,

    Can you check C:\Users\<user>\AppData\Local\Xamarin\Logs\Xamarin.Simulator for logs? (If you go to Help -> Open logs, it's up a directory from there.) Additionally on your mac: ~/Library/Logs/Xamarin/Simulator.Server

    UPDATE: Once it failed... It continues to fail to launch, showing the same orange status bar but never launching the simulator on Windows.

    See if Xamarin.Simulator.exe is still running on your windows machine, kill it and try again.

    I tried killing Xamarin.Simulator it did not help.

    Here's the Xamarin.Simulator log output:

    Startup:
    arguments: --device=5772DE1C-4490-4B20-8C12-82FF16AF4D2F --launchsim=/Users/MyUser/Library/Caches/Xamarin/mtbs/builds/MyAppiOS/9fca357c54973dc4869b93f56cad1d48/bin/iPhoneSimulator/Debug/MyAppiOS.app -argument=-monodevelop-port -argument=54617 -setenv=XAMARIN_DEBUG_PORT=54617 -h=MyMac.local -ssh=MyUser
    version: 0.9.0.25 (2b99ce322ffb6ce8660ef2c03dbc9db6e9868ed9)
    Connection state changed:
    State: Connecting

    As you can see, no error whatsoever, but the orange status bar shows up in visual studio and is stuck at "Launching app for debugging"

  • EricMaupinEricMaupin USXamarin Team Xamurai
    edited May 2016

    @CNicolas Has it ever launched for you? Can you check if ~/Library/Caches/Xamarin/Simulator/Server exists on your Mac and has files in it?

  • CNicolasCNicolas FRUniversity ✭✭
    edited May 2016

    @Eric.Maupin said:
    @CNicolas Has it ever launched for you? Can you check if ~/Library/Caches/Xamarin/Simulator/Server exists on your Mac and has files in it?

    No it has never worked for me.
    The folder Simulator does not exist in ~/Library/Caches/Xamarin/

  • EricMaupinEricMaupin USXamarin Team Xamurai

    @CNicolas If you navigate to C:\Program Files (x86)\Xamarin\Simulator in the command line, can you try running the following command, replacing the appropriate parts. Use the host's ip address and not the hostname.

    Xamarin.Simulator.Windows.exe --device=5772DE1C-4490-4B20-8C12-82FF16AF4D2F -h=HOST_IP -ssh=HOST_USER

  • CNicolasCNicolas FRUniversity ✭✭

    @EricMaupin said:
    @CNicolas If you navigate to C:\Program Files (x86)\Xamarin\Simulator in the command line, can you try running the following command, replacing the appropriate parts. Use the host's ip address and not the hostname.

    Xamarin.Simulator.Windows.exe --device=5772DE1C-4490-4B20-8C12-82FF16AF4D2F -h=HOST_IP -ssh=HOST_USER

    Nothing happens, no error message.
    Nothing more in the logs than when trying with visual studio.
    Killing the Xamarin.Simulator process does not help

  • EricMaupinEricMaupin USXamarin Team Xamurai

    @CNicolas And just to be certain, you're running the alpha channel on both your windows machine and your mac? And you're able to connect and deploy to the regular simulator from VS?

  • CNicolasCNicolas FRUniversity ✭✭

    @EricMaupin said:
    @CNicolas And just to be certain, you're running the alpha channel on both your windows machine and your mac? And you're able to connect and deploy to the regular simulator from VS?

    Yup, iOS Simulator works fine, both xamarin studio on Mac and VS on Windows are running on the alpha channel.
    I'm also not able to get the Xamarin Previewer to work on Mac but that's another problem (Xamarin.Forms is also on the alpha channel).

  • MalteThomenMalteThomen DEMember

    The same thing happens to me. I can debug and deploy from VS to the Simulator without any problems.
    But if i switch to "Remote Simulator to Windows" the bar at the bottom switches to orange with the message "Ready" after starting the iOS app.
    The process Xamarin.Simulator.exe is started and my logfile looks exactly like CNicolas.
    I don't know if the information is useful but the path at --launchsim /Users/USERNAME/Library/Caches/Xamarin/mtbs/builds/PROJECTNAME/SOMEGUID/bin/iPhoneSimulator/Debug/PROJECTNAME.app doesn't exist on my mac. Maybe the app isn't deployed?

    I have also checked ports and the manual start via commandline with my device id and ip nothing.
    My Xamarin is on both Mac/Win on latest alpha version. I've also used the "check for update" option in vs same here all up to date on alpha channel.

    I am using VS 2015 Version 14.0.25123.00 Update 2 for further version information see attached picture. (i get this information via VS->help -> About Microsoft Visual Studio)

  • RafaelNicoletiRafaelNicoleti BRMember ✭✭

    Hey guys, same problem here.... =(

  • EricMaupinEricMaupin USXamarin Team Xamurai

    Can you privately send me the standard VS logs (open/zip logs in help) and the simulator logs? Either by way of bugzilla bug with private attachment or emailing me ([email protected]).

    Additionally I'm preparing an update with additional logging so we can hopefully pinpoint the exact issue, I'll post here when that's available.

  • pmoprhypmoprhy USMember

    I'm also not able to use the ios-simulator on windows. I switched the mac dev agent to use a static ip and launched the app and I get an error dialog after the simulator comes up: "Failed to install" to NAMEOFMYAPP to device_ID. Here are the log files from Xamarin.Simulator.Windows.exe
    Startup:
    arguments: --device=241FB49F-9C02-47B9-AC58-110F48B3FF74 --launchsim=/Users/User/Library/Caches/Xamarin/mtbs/builds/testEventUpdateiOS/8d90e74ed8c9ff895219a217c898276a/bin/iPhoneSimulator/Debug/testEventUpdateiOS.app -argument=-monodevelop-port -argument=51385 -setenv=XAMARIN_DEBUG_PORT=51385 -h=192.168.4.61 -ssh=User
    version: 0.9.0.25 (2b99ce322ffb6ce8660ef2c03dbc9db6e9868ed9)
    Connection state changed:
    State: Connecting
    Connection state changed:
    State: Connected
    Start device request:
    Current State: Unknown
    UUID: 241FB49F-9C02-47B9-AC58-110F48B3FF74
    Name: iPhone 6s Plus
    Platform: iOS
    Version: 9.3
    Device state changed:
    UUID: 241FB49F-9C02-47B9-AC58-110F48B3FF74
    State: Starting
    Device state changed:
    UUID: 241FB49F-9C02-47B9-AC58-110F48B3FF74
    State: Started
    App failed to install+launch:
    Device: 241FB49F-9C02-47B9-AC58-110F48B3FF74
    Path: /Users/User/Library/Caches/Xamarin/mtbs/builds/testEventUpdateiOS/8d90e74ed8c9ff895219a217c898276a/bin/iPhoneSimulator/Debug/testEventUpdateiOS.app
    Arguments: -monodevelop-port 51385
    Connection state changed:
    State: Disconnected

  • EricMaupinEricMaupin USXamarin Team Xamurai

    @pmoprhy If you get the "failed to install" error, try disabling the remoting and deploying to the normal simulator. Then re-enable it and see if it works then: https://developer.xamarin.com/guides/cross-platform/windows/ios-simulator/#Known_Issues

  • pmoprhypmoprhy USMember

    EricMaupin - Yes, that "fixes" the issue.

  • RafaelNicoletiRafaelNicoleti BRMember ✭✭

    @EricMaupin this is zip logs,

  • RafaelNicoletiRafaelNicoleti BRMember ✭✭

    @EricMaupin Log Simulator

    Startup:
    arguments: --device=E9336554-2487-4E3F-B992-9AD9AD5E2ECC --launchsim=/Users/Rafael Nicoleti/Library/Caches/Xamarin/mtbs/builds/tocalivrosios/06c74df3a13ded89ee37bcf517bdc6a9/bin/iPhoneSimulator/Debug/comtocalivrosiosapp.app -argument=-monodevelop-port -argument=50560 -setenv=XAMARIN_DEBUG_PORT=50560 -h=MacBook-Pro-de-Rafael.local -ssh=Rafael Nicoleti
    version: 0.9.0.25 (2b99ce322ffb6ce8660ef2c03dbc9db6e9868ed9)
    Connection state changed:
    State: Connecting

  • ericleigh007ericleigh007 USMember

    I guess I'm in the same boat as the others.
    I'll monitor for some new alphas and try them as soon as I can, or collect logs, etc, in order to help.

    Thanks for your excellent work. Xamarin is a star and with Microsoft I hope to see continued improvement.
    -e

  • RafaelNicoletiRafaelNicoleti BRMember ✭✭

    Log more information, I still the same problem

    System.Net.Mqtt.Client.ClientPacketListener Warning: 0 : [2016-05-24 16:52:55.0057] Client build4300MT3 - No packet has been sent in 90 seconds. Sending Ping to Server to maintain Keep Alive

    Anybody can helpe-me?

  • RafaelNicoletiRafaelNicoleti BRMember ✭✭

    Log more information, I still the same problem

    System.Net.Mqtt.Client.ClientPacketListener Warning: 0 : [2016-05-24 16:52:55.0057] Client build4300MT3 - No packet has been sent in 90 seconds. Sending Ping to Server to maintain Keep Alive

    Anybody can helpe-me?

  • RasmusChristensenRasmusChristensen DKUniversity ✭✭

    I've just installed the windows simulator. I'm running the BETA channel, which according to the doc should be ok. But i don't get any simulator window, even though the debug session starts. Is it only working for ALPHA?

  • EricMaupinEricMaupin USXamarin Team Xamurai

    Are all of you logging into the mac from VS with a username that contains spaces? Try logging in with the shortened version (the username that shows in your ~ path on mac). /ping @RafaelNicoleti

    I've just installed the windows simulator. I'm running the BETA channel, which according to the doc should be ok. But i don't get any simulator window, even though the debug session starts. Is it only working for ALPHA?

    @rasmuschristensen Should work on either, see above.

  • ylyyly USMember

    after installation iOS Simulator (for Windows) in Tools > Options > Xamarin > iOS Settings no Simulator option
    vs2105 enterprise

  • RasmusChristensenRasmusChristensen DKUniversity ✭✭

    @Eric.Maupin Thank you very much. I disconnected the connection and "forget this mac". restartet VS 2015. Connected to the mac again, this time using the short name. Hit F5 and baaam I now have a running IOS simulator on windows. Thank you very much. Just a small note, the simulator is running as a separate program so it might hide behind Visual Studio.

  • AmroOsama.1516AmroOsama.1516 SAMember ✭✭

    @Eric, switching to IP instead of the network name and also writing the short username did the trick for me!
    Thanks!

    I hope this info is added to the simulator page so people know about these issues.

    PS: I've started a thread about this problem before I knew that there was a discussion here, so if possible please let someone delete it

  • RafaelNicoletiRafaelNicoleti BRMember ✭✭

    Now it's working for me, I remove spaces in my username and worked! Thanks @EricMaupin !

  • MichaelPerryMichaelPerry USMember

    I saw the simulator for one brief shining moment. And then it was gone.

    To get this far, I created a new account on the Mac with no spaces. I made it an administrator. I used a local password instead of connecting it to my Apple ID. I logged in, and I had Xamarin Studio running.

    Then I connected using the IP address instead of the machine name. And I also looked for any running instances of Xamarin.Simulator.Windows and killed them.

    I connected to the host successfully, rebuild the project successfully, and hit F5. The simulator eventually appeared on Windows, but it showed a perpetual progress ring and did not load the OS. Finally, I killed it and tried again.

    Now I get this in the log file:

    Startup:
    arguments: --device=8DAFB830-8444-4B4E-BBAB-90280F39C1F6 --launchsim=/Users/michael/Library/Caches/Xamarin/mtbs/builds/iOSApp/de9ecca3330035ecf42eeee0528725e1/bin/iPhoneSimulator/Debug/iOSApp.app -argument=-monodevelop-port -argument=50653 -setenv=XAMARIN_DEBUG_PORT=50653 -h=192.168.1.64 -ssh=michael
    version: 0.9.0.25 (2b99ce322ffb6ce8660ef2c03dbc9db6e9868ed9)
    Connection state changed:
    State: Connecting
    Connection state changed:
    State: ConnectionFailed
    Connection state changed:
    State: Disconnected
    Connection state changed:
    State: Connecting
    Connection state changed:
    State: ConnectionFailed
    Connection state changed:
    State: Disconnected
    Connection state changed:
    State: Connecting

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    To remote iOS simulator in Windows, I followed the Getting Started instructions in the iOS Simulator (for Windows) document, after updating to Cycle-7 update of Xamarin in both Mac running El Capitan and Windows 10 on Surface Book. But I am not seeing the "Remote Simulator to Windows" check box.

    I have tried running the project in the iOS Simulator on Mac once, closed VS and restarted it, but no option.

    What am I missing?

Sign In or Register to comment.