Xamarin installation in Mac

Setup Xcode

Xcode is needed for iOS development. It included with SDK to build iOS codes and iOS Simulators.

  1. Go to AppStore and search for Xcode. Click GET and INSTALL it. You will need to input your Apple ID and password in order to download app from AppStore.
    Screen Shot 2017-06-29 at 5.24.22 PM.png
  2. You will need to Agree on the License Agreement before Xcode start to download and install.Screen Shot 2017-06-29 at 6.10.53 PM.png
  3. Xcode will start to download (4GB++) now. The installation will start automatically after download completed. After that, click on Xcode button to start the app for once. During the first start, Xcode will initialize and install some components.
    Screen Shot 2017-06-29 at 6.11.16 PM.png
  4. After the initialization is completed, you should see the following screen. Xcode is successfully installed and you may close it now. Screen Shot 2017-06-29 at 6.12.15 PM.png

Setup Visual Studio for Mac

Xamarin development in Mac will be using Visual Studio for Mac.

  1. Download installer from visualstudio.comScreen Shot 2017-06-29 at 6.17.46 PM.png
  2. Double click on downloaded installer and you will see the following dialog popup. Double click on the Install button to start installation.
    Screen Shot 2017-06-29 at 9.07.51 PM.png
  3. Click Open button when there is a warning dialog popup.Screen Shot 2017-06-29 at 9.08.05 PM.png
  4. Visual Studio installer will now started and performing some checking on the machine.
    Screen Shot 2017-06-29 at 9.08.28 PM.png
  5. You will need to agree on the Microsoft Privacy Statement and License Terms in order to continue installation. Just click on Continue button.Screen Shot 2017-06-29 at 9.08.45 PM.png
  6. The installer will ask to get Xcode. We already completed this part and will just click on Continue button.
    Screen Shot 2017-06-29 at 9.09.03 PM.png
  7. Select all components that you would like to install. Then click on Install button.
    Screen Shot 2017-06-29 at 9.09.16 PM.png
  8. Components will start to download (~3.5GB). Screen Shot 2017-06-29 at 9.09.48 PM.png
  9. After half an hour, the installation is mark as successful. Click on Start Visual Studio button.Screen Shot 2017-06-29 at 9.32.37 PM.png
  10. Visual Studio for Mac is started and ready to build awesome app.Screen Shot 2017-06-29 at 9.33.30 PM.png

Setup Android SDK

  1. Click on Tools>SDK Manager
    Screen Shot 2017-06-29 at 10.13.09 PM - Copy.png
  2. A dialog is show but indicating Android SDK and Android NDK is not found. This might be due to we didn’t check to install Android SDK during Visual Studio for Mac installation.Screen Shot 2017-06-29 at 10.13.22 PM.png
  3. Run the Visual Studio for Mac installer again and Continue until Select components screen. Check to install Android SDK and click Install button.Screen Shot 2017-06-29 at 10.24.31 PM.png
  4. Android SDK started to install.Screen Shot 2017-06-29 at 10.25.08 PM.png
  5. After the installation completed, click on Tools>SDK Manager. SDK Manager dialog will popup.Screen Shot 2017-06-29 at 10.27.35 PM.png
    Screen Shot 2017-06-29 at 10.28.14 PM.png
    Screen Shot 2017-06-29 at 10.28.23 PM.png
  6. Update Android SDK according to recommended list in HERE

Installation Test: Xamarin iOS

  1. Open Visual Studio for Mac and click on New Project. New project dialog will popup. Select Xamarin.Forms>Blank Forms App and click Next button.Screen Shot 2017-06-29 at 10.29.03 PM.png
  2. Give the app a nameScreen Shot 2017-06-29 at 10.29.40 PM.png
  3. Specify Project Name, Solution Name and Location. Finally, click on Create buttonScreen Shot 2017-06-29 at 10.29.50 PM.png
  4. 3 projects is automatically generated by Visual Studio for Mac. Make sure XamInstall.iOS project is selected (project name is bold), then click Play button to RUN the app.Screen Shot 2017-06-29 at 10.30.33 PM.png
  5. Visual Studio will build the solution and deploy to iOS Simulator. If you can see this, it means that you have successfully setup Xamarin for iOS development.
    Screen Shot 2017-06-29 at 10.31.28 PM.png

Installation Test: Xamarin Android

  1. Right click on Android project (XamInstall.Droid), click on Set As Startup Project. Android project name will be bold now.Screen Shot 2017-06-29 at 10.31.44 PM.png
  2. Click Run button. It will takes some time for first time build.Screen Shot 2017-06-29 at 10.32.27 PM.png
  3. Visual Studio will build the solution and deploy to Android Emulator. If you can see this, it means that you have successfully setup Xamarin for Android development.Screen Shot 2017-06-29 at 10.34.31 PM.png

Additional

After the new project is created, you will notice that NuGet packages in solution is outdated. Android Support Library is only version 23.3.0. The latest available version is already 25.3.1. Please update the packages in all project before you continue to work on the solution.

Leave a comment