I'm just starting trying to use Xamarin.iOS, building in Visual Studio with a build host of a brand new Mac Mini.
Various bits of version information:
PC:
Mac:
(I've tried various different versions, which behave in the same way.)
Xamarin Business Licence (.iOS, .Mac, .Android) - activated in the normal way on Windows, but out of desperation I've activated it manually on the Mac (by downloading the licence file).
Both machines are connected via ethernet on the same local network. The Mac has no firewall on (which is alarming in itself, to be honest). Windows just has the normal firewall configuration - nothing out of the ordinary.
I've managed to start Xamarin Studio on the Mac Mini, and debug the master/detail demo on the iPad simulator. The problems come when I try to use it as a Build Host from the PC.
In Visual Studio, under Options / Xamarin / iOS Settings, Current Mac Build Host, Configure, the dialog does see my Mac - but it has problems communicating with it. In the list, it either shows it as Unreachable, or Not Activated. When I click on Diagnose, it's fine until the "Establishing a stateful connection to Mac build host via HTTP" - that usually works (but not always), but takes a long time - a suspiciously long time. The "Comparing Remote and Local MonoTouch SDK" part always fails, but I've never been prompted to update either system to get them in sync.
The activation part usually comes up green now, but until I manually activated it, I could hit the "Activate" button as many times as I wanted, but I only saw "Unable to connect to the remote server" - which is also what I get when trying to launch an application.
It definitely sounds like a network issue somewhere, but I can't tell where - especially as it sometimes seems to get through. Any further diagnostics I should try to perform?
Okay, so I'm dumb - though I'd say it's not entirely my fault
As I went to shut down the Mac, I found there was an "Activation successful" dialog box which had popped up under my browser etc. When I closed that and went back to the PC, all was well - the SDK updated, everything realizes it's activated, and I can build.
Admittedly the sample Hello World app is currently failing once it's launched, but hey - at least it's launched...
Hi again @JonSkeet,
Try also the steps described here: http://www.colinbowern.com/posts/the-simulated-application-quit
Make sure to rebuild your project, try again and let us know.
Thanks!!
I had this happening to me as well with my very first project and what eventually resolved it was to give the application an Identifier (Project Settings -> IOS Application -> IOS Application Target)
Answers
Okay, so I'm dumb - though I'd say it's not entirely my fault
As I went to shut down the Mac, I found there was an "Activation successful" dialog box which had popped up under my browser etc. When I closed that and went back to the PC, all was well - the SDK updated, everything realizes it's activated, and I can build.
Admittedly the sample Hello World app is currently failing once it's launched, but hey - at least it's launched...
Good to see you managed to get this figured out, Mac machines like to hide windows behind windows, unhelpfully, but I'll get this info back to the team to see if there's anything we can do to help in the future.
Looks like I spoke a little too soon. Anything I tried resulted in the simulator just sitting there, so I thought I'd reboot. Then I was back to it thinking it required activation... then going through the Diagnose step, it thought it was out of date again.
Now when trying to launch the debugger, it's sitting at "Starting debug session..." while the Mac has a blank-screened iPhone or iPad. Eventually, I get: "Server returned an error. The request was aborted: The operation has timed out." (on the Windows side).
It definitely feels like the communications are on the flaky side. Would you expect the "Establishing a stateful connection to Mac build host via HTTP" step to be quick during the diagnosis phase? I'm wondering whether there's some glitch in the network which is fouling just enough up to make it all flaky.
Further diagnosis? Are there logs I should look at? Wireshark traces? Apologies for being completely out of my depth here...
(Off to bed now anyway, so no urgent rush
Hi @JonSkeet,
The "Establishing a statefull..." step is not expected to be quick. Actually is the one that ensures that the connectivity is absolutely possible and it may take some extra seconds.
In order to get further details, we should take a look at the Mac build host log. This file is at ~/Library/Logs/Xamarin/MonoTouchVS/mtbserver.log. Please, could you gist or paste the content you think it could help us to figure out what's happening?
Thanks
Hi @jtorres,
Thanks for the extra info. I'm getting various log lines like this:
Launching application
It's not clear to me whether the -devname warning is related to the "iOS Simulator failed to install the application" part.
I reset the simulator, relaunched from VS, and this time the log contained:
No idea whether that's helpful or not, but I guess it suggests moving on to a different log file?
Just to reiterate an earlier point, I was able to launch an app on the simulator from Xamarin Studio running on the Mac - but now even that's failing (in the same way - I get to try to relaunch the simulator, but that's all). Looks like I've messed the whole system up somehow
Maybe tomorrow I'll work out what I need to reinstall or clean up...
Hi again @JonSkeet,
Try also the steps described here: http://www.colinbowern.com/posts/the-simulated-application-quit
Make sure to rebuild your project, try again and let us know.
Thanks!!
I had this happening to me as well with my very first project and what eventually resolved it was to give the application an Identifier (Project Settings -> IOS Application -> IOS Application Target)
Thanks for all the help, everyone - lots of steps to know about. One of the projects is still failing, but I've got enough to get me moving now. Onwards and upwards!