Want to create Xamarin.iOS apps without buying a Mac? Rent one!

As a mobile developer you will know that a MacOS device is stringently required to build and run iOS apps. Same is with Xamarin: You can write your code wherever you want but when it comes to compiling you need a Mac. Fortunately Xamarin ship a tool called Build Host which connects your Windows machine to a Mac anywhere in your network and compiles your code there. But you still need to buy at least one Apple. If you don’t want to invest the money, renting a remote on via MacinCloud might be an option for you.

Renting a Mac?

Yeah, it sounds weird but why not? Others rent luxury cars if they can’t or don’t want to afford them, so can’t be a shame to rent an overpriced piece of tech. MacinCloud offers you several plans to do that. You can choose to pay only what you use and get billed by hour or having an own machine which waits 24/7 for you to connect. Just check the pricing page, they will have something that fit your needs and wallet.

The chance is good that they have everything you need to develop or build your solution. These Macs have a whole bunch of software pre-installed which includes Xamarin and several other SDKs, GitHub, Java, different mobile development tools and much more.

Setting up the environment

Once you chose a subscription you will receive an E-Mail with all the information you need like the IP-Address and credentials as well as a zip file with Remote Desktop profiles. Simply double click one of them to connect with your remote Mac. All you need to do here is starting the Xamarin.iOS Build Host application. After a click on the Pair button, your Mac is ready to receive build instructions from your Windows PC.

Now you can plug the other end of the cable: Start Visual Studio and open the Tools → Options → Xamarin → iOS Settings options pane, where you can connect your IDE with a remote build host for iOS applications. Because the rented mac is not in your local network you need to configure the host manually by clicking on the corresponding button. Enter the IP-Address from your E-Mail and the connection Code that the Xamarin.iOS Build Host on your Mac shows.

connectBuildHost

Compiling on the Mac

When the connection between Visual Studio and your remote Mac is up and running you can send it your iOS applications for building and testing.
5
Choose an iPhone simulator as deployment target inside your IDE and test your application remotely. It’s that simple! Depending on the connection speed there might be some lags but I was surprised how responsive and fast the iPhone emulator on the remote Mac was.

Anything else I need to know?

In most cases you do not have admin rights on the hosted machine, which means that you won’t be able to change or update the installed version of Xamarin. Make sure, that you run the same one as the hosted Mac. In the moment that I write this article, the installed version of Xamarin.iOS is 9.0 which means you might have to downgrade. Oh, and make sure to always log off when you are finished to avoid unnecessary costs.

Summary

Renting a remote Mac is an easy way to jump into iOS development without investing thousands of dollars for a performant Apple device and is definitely good enough to test some applications quickly. As a hardcore iOS developer you will come to a point where buying a Mac is cheaper than renting one for a long period of time but for beginners this is an interesting alternative.

There also is a free trial to find out if renting a Mac is an option for you. In my eyes MacinCloud is an interesting choice if you just want to try out iOS development or just need to compile an iPhone app occasionally. Let me know what your thoughts are.

Leave a Reply

Your email address will not be published. Required fields are marked *