Alessandro Del Sole's Blog

/* A programming space about Microsoft® .NET® */
posts - 159, comments - 0, trackbacks - 0

My Links


Your host

This is me! This space is about Microsoft® .NET® and Microsoft® Visual Basic development. Enjoy! :-)

These postings are provided 'AS IS' for entertainment purposes only with absolutely no warranty expressed or implied and confer no rights.

Microsoft MVP

My MVP Profile

I'm a VB!

Watch my interview in Seattle

My new book on VB 2015!

Pre-order VB 2015 Unleashed Pre-order my new book "Visual Basic 2015 Unleashed". Click for more info!

My new book on LightSwitch!

Visual Studio LightSwitch Unleashed My book "Visual Studio LightSwitch Unleashed" is available. Click the cover!

Your visits

Follow me on Twitter!

CodePlex download Download my open-source projects from CodePlex!

Article Categories


Post Categories

.NET Framework


Help Authoring

Microsoft & MSDN

Setup & Deployment

Visual Basic 2005/2008/2010

Xamarin: use MacInCloud to compile apps for iOS with Visual Studio 2015

As you know, Xamarin allows you to build mobile apps for different platforms: Android, Windows, and iOS by using either Xamarin Studio or Visual Studio 2015. While for Android and Windows you have more freedom, with iOS you necessarily need a Mac (with XCode installed) to compile an app. And, notice "to compile". This is because of some Apple policies.

If you need to develop apps for iOS but you do not own a Mac, you can use a paid service called MacInCloud.
This company basically allows you to rent a Mac that you reach via remote desktop. You simply need a subscription, then you associate Xamarin to the Mac and.. ready to compile! I had a chance of using MacInCloud personally, so I'll describe how it works and I'll also provide some hints that you won't discover easily. Finally, this blog post is on Visual Studio 2015, but the same concepts apply to Xamarin Studio.

First, visit

You will be able to compare available plans and select the best for you:

I personally tried the Pay-as-you-go plan, which is honest in my opinion. With 1$/hour you get all you need. Pay attention: if you choose this plan, you will be required to pre-pay the first 30 hours with 30$. Additional hours will be charged separately. When registering, pay also attention to the following:

  • Choose OS X "El Capitan". Do not choose Yosemite, because there are some compatibility issues with the latest versions of Xamarin.
  • Make sure you select to activate the remote build agent. This will charge you with additional 5$ but it is mandatory to make Xamarin able to connect to the remote Mac.
Once paid and registered, you will receive an email with important information such as: name and IP address of your remote Mac, a zip archive containing .rdp files for remote desktop connection, and of course user name and password you need to connect to the Mac. There are several .rdp files, each with a specific screen resolution. Select one and enter your credentials:

If everything is working fine, after a few seconds you will access your remote Mac:

Make sure you have port 6000 unblocked, or visit the FAQ page if you have problems. I had, and the MacInCloud team was very quick to respond and help. Your remote Mac already has all you need for development, including Xamarin Studio and XCode. The latter will not be used directly, but it is necessary because it contains the SDK that Xamarin invokes for the compilation process. Important: start XCode at least once before you do anything else with Xamarin. This is required to activate all the components.

Leave the remote connection open while working with Visual Studio, and remember to Logout when done, otherwise the hour counter will go on.

Now let's go to Visual Studio 2015. Follow these steps:

  1. Open Tools, Options, Xamarin, iOS Settings
  2. Click Find Xamarin Mac Agent
  3. In the dialog, click su Add Mac

First, add the IP address of the remote Mac (the IP, not the name), you received in the activation email:

Click Add. The underlying dialog will contain the name of the newly added Mac, but for now do not click Connect. Click Close instead:

At this point, you will go back to the Xamarin options. Leave blank the Apple SDK field, as it is in the default location on your remote Mac. You can select the Remote simulator flag if you want to debug your app in the local simulator on in the remote simulator. If you uncheck, it will run remotely.

Now open any Xamarin project. You might be asked to enter your Mac credentials, so enter your user name and password. If not when opening a project, credentials will be requested when starting the debug task.

In the toolbar, in the configuration combo box select the iPhone Simulator, then select one of the emulated devices from the list near the Start button. You will find different versions of iPhone and iPad.

Note that the remote Mac Agent must be fully started before compilation. When connecting to the Mac, you will see a success message in the status bar. When ready, simply press F5 or start debugging. The following figure shows the app running in the remote simulator, whereas the second figure shows the app running locally.

Of course, this is what you need to compile, debug, and test an app for iOS but you will also need to read the Xamarin and Apple documentation about publishing and distributing the app.

I was satisfied with MacInCloud and I hope this blog post is useful to you.


Print | posted on venerdì 19 agosto 2016 15:07 | Filed Under [ Xamarin ]


No comments posted yet.

Post Comment

Please add 5 and 1 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET