2013-06-28

Switch Xamarin Studio to Xcode5 for iOS 7.0 Development (and back)

I enjoy using Xamarin.  I also want to play with the Xcode5 Developer Preview.

But sometimes I want to switch back & forth between Xcode5 and Xcode4.  Why?  Because of this:


That's the message you'll get in Xamarin if you use Xcode5-DP.  So I hacked out a quick Python script to help me switch back & forth in my project.

It's simple enough to just be worthy of a Gist.  See: xamarin_switch.py at https://gist.github.com/xeb/5890019.

Use it within the directory of the solution & csproj that you are working with.  Then just run the script & specify which verison of Xcode you want.  (Either a 4 or a 5 or "xcode4" or "xcode5").

Example:


Again thats....

xamarin_switch.py xcode4
To go to Xcode4 + iOS 5.1/6.0/etc.

and

xamarin_switch.py xcode5
To go to Xcode5-DP + iOS 7.0

This did three things:

  1. Changed the SDK Location of Xamarin Studio
  2. Changed the first CSPROJ file to the correct iOS Build version
  3. Launched Xamarin Studio for the first SLN file located in the working directory

Hopefully it helps someone out there!