• behance
  • gitHub
  • google
  • linkedin
  • twitter
Cross Platform Development w/ Xamarin & SVN Source Control on OSX

Cross Platform Development w/ Xamarin & SVN Source Control on OSX

Hmm, rather ambitious title there Jammer …

Anyway, I’ve just started looking at building some iOS and Android (plus others in the future) development and have so opted to use Xamarin as I’m primarily a C# developer and I have a LOT of custom .NET code in my arsenal it makes the most sense.  I can also share all the same business logic and class libraries across all the products I develop which is a massive win on many levels.

Anyway, I have a massive Subversion repository on my main development box running Windows 7 that contains the ASP.NET MVC web site and also the main WebAPI project that all the various components in the system essentially use as the data access layer.  Some of the more key security elements are initially only going to be available on the web site so there is a small sub set of data access portions of the solution coded directly in the web site project.

Now that I’m going to be working on the iOS and Android solutions I need to get the mac integrated into the work flow.  On the mac I also have parallels installed which is running Windows 8 in a VM, I also use this for some development so that checks in and checks out code from the main Windows 7 repositories using TortoiseSVN.  On the mac however the SVN client world seems a little more fragmented, the only direct analogies to TortoiseSVN are all commercial solutions with all the free tools really lagging on functionality or they seem to be in a abondonware state despite the fact that OSX actually ships with SVN already installed (see the SVN upgrading guide I posted a couple of days ago).

For my OSX client I’ve actually opted to SmartSVN as this seems like a well maintained and comprehensive solution that is also commercial but pretty well priced at $69 but thee foundation version is actually free but as you would expect it does lack some key features.  No real surprises there.

Anyway, the reason for this post was getting OSX integrated into the source control aspects of things.  The Windows 8 VM has no issues connecting to the Subversion repository on the Windows 7 box.  I have VisualSVN Server installed on the Windows 7 box to provide easy configuration of how SVN exposes the repositories over http and https.  The problem I had was getting OSX to play nicely with the windows 7 box.  Everytime I tried a checkout I would get this error:

svn: E120108: Error running context: The server unexpectedly closed the connection.

Basically OSX cannot resolve the Windows 7 box by name on the network (a Wi-Fi router).  To get around this issue I didn’t want to go through the process of installing Bonjour on the Windows 7 box so the only other option is to give the Windows 7 box a static IP address on the network and then map that IP address to the server name.  Considering all the machines get their IP addresses dynamically from the DHCP setup on the router I decided that the easiest way to deal with this was to actually setup an IP reservation in the router for the Windows 7 box.  That way I haven’t assigned any machines static IP addresses but the router will always apply the same IP address to the Windows 7 box.

Once this was setup up I edited the hosts file on OSX and added a line in like this:

192.168.0.3 jamhq

And voila, I can now checkout the repositories to my instance of OSX and get on with the development.  I’ll no doubt blog about this again if I find anything useful that others may benefit from.  I’ll also be writing up my experiences using Xamarin.

Leave a reply

*