Installing Xamarin and other required components

Xamarin can be installed during custom Visual Studio installation. For now, let's assume that Xamarin has not been installed and that you need to do that now, after you have installed Visual Studio.

Getting ready

One thing to be aware of if you want to target iOS is that you will need to use a Mac to build your iOS applications.

How to do it…

  1. In the Control Panel, click on Programs and Features. Right-click on your Visual Studio installation and click on Change:
    How to do it…
  2. This will display the Visual Studio installer for you. Here you can modify your current Visual Studio installation by adding and removing components at will. Notice that we have selected C#/.NET (Xamarin v4.0.3) and HTML/JavaScript (Apache Cordova) Update 8.1 to install. If you have no interest in using Xamarin, then leave off the Xamarin component and just keep the Apache Cordova option selected. This will still allow you to create Android applications using Apache Cordova instead of using Xamarin. Similarly, if you have no interest in Apache Cordova and simply want to create Android applications and iOS applications using Visual Studio, select the Xamarin component to install. The rest of the installation is straightforward:
    How to do it…
  3. There is also a second step we need to take if we want to use Xamarin to target iOS applications. We have to install the required software on a Mac. Head on over to Xamarin's website on your Mac. The URL is https://www.xamarin.com/. Click on the Products dropdown and select Xamarin Platform from the list:
    How to do it…
  4. You can also access the required page by going to https://www.xamarin.com/platform. Clicking on the Download now for free button will install something called Xamarin Studio on your Mac. You need to be aware that when installed on a Mac, Xamarin Studio cannot create Windows Apps. It will only allow you to create iOS and Android apps on a Mac. Along with Xamarin Studio, you will also get the Xamarin Mac Agent (previously called the Xamarin Build Host). This is a required component so that you can link your PC to your Mac in order to build your iOS application. Lastly, the PC and Mac must also be able to connect to each other over a network (more on this later):
    How to do it…
  5. After downloading the installer on the Mac, the installation is straightforward. Just follow the screen prompts to complete the installation:
    How to do it…

How it works…

The steps we took previously when installing Xamarin and Apache Cordova will allow us to do the following:

  • Install Apache Cordova: If you only want to target Android, iOS, and Windows but don't want to use Xamarin
  • Install Xamarin: If you want to target Android, iOS, Windows, or all three and use a single solution to do so

Visual Studio is extremely flexible and offers developers a wide variety of choice.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.156.235