Forum Visual Studio

Xamarin breaks iphone simulator on new mac

On my new clean mac deploying an iphone app from Visual Studio crashes the simulator, and then the simulator can not be opened ever again.

I have a problem with Xamarin and the iphone simulator running on my new Mac with a clean installation of Mac OS 10.8.3.
I have Xcode 4.6.1 and Xamarin Studio 4.0.4 (build 2), and I am deploying the Hello World application from a Windows computer (I have tried this both from a PC and from a Windows installation with Parallels on the Mac).

This is how I have tested:

  1. First I have run the default Master-Detail application from Xcode in the simulator: It works.
  2. Then I run the default Master-Detail application from Xamarin Studio in the simulator: It works.
  3. Then I run the default Hello World application from Visual Studio: The simulator crashes with the message as shown in the attached image

Now, the serious part of this problem is that now the simulator crashes with the same message even if I try to run the Master-Detail project from Xcode or from Xamarin Studio.
In fact just opening the simulator from Xcode->Open Developer Tool ->iOS Simulator makes the simulator crash with the same message.
So when this happens the Mac is rather useless as a development tool, so I uninstalled Xcode, rebooted, and installed Xcode again. But to my surprise the simulator still crashes with the same message.

Since this is a new Mac, I have reinstalled iOS and tried this again three times actually, and I have the same problem every time. Everything works fine until I deploy a iphone application from Visual Studio, and then the simulator won’t work again.

Can you try to reproduce this error yourself on a clean mac? I guess more people will have this problem when they are getting new macs…

The new mac I have got is the new 15 inch retina Macbook Pro, with 16 GM RAM, 2.7 GHz Intel Core i7.
By the way, I can still deploy the applications from Visual Studio to my old mac, so the problem seems to be happening only on clean installations.

(As a side note: I am not running Xcode 4.6.2, since the build server does not start with 4.6.2 (again this is on a clean installation, I guess an older upgrade would work, if the “prefix” in the error message was already added in an earlier version): From mtbserver.log when trying to connect to the build server:

[20-Apr-2013 13:05:23] Error: Error loading Xcode information for prefix '/Applications/'
[20-Apr-2013 13:05:23] Exception: Exception type: System.FormatException
Input string was not in the correct format
at System.Int32.Parse (System.String s) [0x00000] in :0
at MonoTouch.Tools.Frameworks.AppleSdkSettings.Init () [0x00000] in :0
[20-Apr-2013 13:05:23] Exception: Exception type: System.ApplicationException
Apple SDK developer root not specified.
at MonoTouch.Tools.Frameworks.MonoTouchFrameworks.Init () [0x00000] in :0
at Mtb.Application.MainClass.Init () [0x00000] in :0
at Mtb.Application.MainClass.Main (System.String[] args) [0x00000] in :0
[20-Apr-2013 13:05:23] Error: Unknown error occurred.

Kolbjørn Bredrup


  • ChrisHardyChrisHardy GBForum Administrator, Xamarin Team Xamurai

    Can you paste in the information from Xamarin Studio -> About Xamarin Studio -> Show Details -> Copy Information? Thanks!

  • KolbjrnBredrupKolbjrnBredrup NOMember

    Yup. Here it is:

    === Xamarin Studio ===

    Version 4.0.4 (build 2)
    Installation UUID: 02ae0034-8db4-4d2c-913b-5e8206febbe4
    Mono 2.10.12 (mono-2-10/c9b270d)
    GTK 2.24.16
    GTK# (
    Package version: 210120000

    === Apple Developer Tools ===

    Xcode 4.6.1 (2067)
    Build 4H512

    === Xamarin.Mac ===

    Xamarin.Mac: Not Installed

    === Xamarin.Android ===

    Version: 4.6.4 (Starter Edition)
    Android SDK: /Users/kolbjorn/Library/Developer/Xamarin/android-sdk-mac_x86
    Supported Android versions:
    2.1 (API level 7)
    2.2 (API level 8)
    2.3 (API level 10)
    3.1 (API level 12)
    4.0 (API level 14)
    4.0.3 (API level 15)
    Java SDK: /usr

    === Xamarin.iOS ===

    Version: (Business Edition)
    Hash: 8d98f5e
    Build date: 2013-10-04 14:08:06-0400

    === Build Information ===

    Release ID: 400040002
    Git revision: a8bf58d398a13bcc7595f5f85adae04865a834d4
    Build date: 2013-04-17 16:35:47+0000
    Xamarin addins: f24db65837464cb72995ce5e84fa62fb0069724c

    === Operating System ===

    Mac OS X 10.8.3
    Darwin KBNimbleMac.local 12.3.0 Darwin Kernel Version 12.3.0
    Sun Jan 6 22:37:10 PST 2013
    root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64

  • ChrisHardyChrisHardy GBForum Administrator, Xamarin Team Xamurai

    It sounds like something is getting cached when building the app and it's trying to find Xcode 4.6.2 instead. Does building an app in Xamarin Studio on the Mac Build Host work? Have you tried restarting the Mac Build Host?

  • KolbjrnBredrupKolbjrnBredrup NOMember

    Hm, I had problem before Xcode 4.6.2 was available, so I don't think that could have been the problem. At least not then. It might be part of the problem now of course.

    And yes, I have tried restarting the build host, and restarting the Mac. And I have also reinstalled MacOS to make the simulator work again. Three times. Everything works fine after the MacOS installation. Then I deploy from Visual Studio for the first time (before anything can have been cached?), but after the first deployment from Visual Studio the simulator stops working.

    Could it be that something is missing when you have a clean install of both Xcode and Xamarin instead of upgrading versions?

    (btw, sorry about my picture, I am really not as angry as that smiley looks)

  • NicWiseNicWise NZMember, Insider, Beta mod

    If you have upgraded your xcode recently, dont forget you MUST reinstall the simulators - it's in Preferences -> Downloads, I think (in xcode) / @chrisntr @klobjrnBredrup

  • KolbjrnBredrupKolbjrnBredrup NOMember

    I reinstalled MacOS and Xcode again, and downloaded all the different simulators in Xcode before installing Xamarin.

    Deploying from Visual Studio 2012 still breaks the 6.0 and 6.1 simulator as before. But it runs and can be debugged from VS when deploying to the 5.0 and 5.1 simulator.

  • otebosotebos PLMember

    I also have this problem. Sunning simulator from Xamarin Studio on Mac works but VS breaks the simulator for good.

    Quick fix I found is to delete iPhone simulator at
    ~/Library/Application Support/iPhone Simulator/6.1
    Just delete this folder and it will be recreated when you run simulator next time.

    When I started tring to run iPhone simulator from VS, Xamarin told that the SDK version is outdated (then I had XCode 4.6.2) and it tried to update SDK.
    What was weird each time I started iPhone projet in VS it wanted to update SDK even update was successfully run alredy few times.
    So I updated XCode to 4.6.3, update is not showing up but VS still corrupts simulator.

    If any one knows how to handle this issue please provide info.

    I use in VisualStudio Xamarin.iOS v1.1.200, on Mac I use Xamarin Studio 4.0.9, Xamarin.iOS and XCode 4.6.3
    I don't have Apple Developer account, no certificates etc.
    For now I just want to run simulator form VS.

  • milkshakemilkshake CAMember

    So did anyone have a solution to this problem? I have the exact same problem on a newly installed PC and Mac that runs everything the latest.
    Also found on stackoverflow

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    @milkshake you should just be able to delete the folders in ~/Library/Application Support/iPhone Simulator/

    From a Terminal, you can type:

    rm -irf ~/Library/Application\ Support/iPhone\ Simulator/*

    You can also do it from Finder, but keep in mind that the Library directory in your home directory is hidden.

  • milkshakemilkshake CAMember

    Got it fixed. Application name, Identifier, Version need to be filled.

Sign In or Register to comment.