Cross Platforms - Managing Azure Mobile Backend And Dealing With NuGet Packages For Native Platforms


This article is a continuation of my previous writing on cross platforms and here, I will be writing about managing Azure mobile back-end, using Azure mobile apps and dealing with NuGet packages for the native platforms.

Target Audience: Intermediate

Please work on my previous articles before working on this one.

Adding Azure Mobile to the Clients

Open Visual Studio 2015 and open up the project which we created in the demo of Part 2.

Click on Solution Explorer and move to the solution file of .Droid extension. Right click on Components and go for "Get more components". This will open a new window, as shown below.

Select Azure Mobile Client SDK in the window given above and click on "Add to App".

Click on "I agree" for the license agreement.

You should find a status that the component has been downloaded, as shown below in the lower most pane of Visual Studio 2015.

The components and reference files of Azure mobile client cannot be seen in the solution file for Windows phone or Windows 8.1.

Thus, to manage this, let's go for Managing the NuGet packages.

On the NuGet Packages, search for "Azure Mobile Client SDK" on browser and add it for the solution file by clicking on "Install".

Agree for the License acceptance to add the Azure Mobile Client SDK for the mobile apps towards Windows Phone 8.1.

Lets add the same NuGet package for the portable solution file of the project now.

Right click on the solution file and click on "Manage NuGet Packages".

Search for the same Azure Mobile Client SDK for the mobile apps in the Browse tab and click on "Install", as shown below.

Accept for the license agreement now.

Click on the "References" file of Portable Solution file and you can find the reference file for Microsoft.WindowsAzure.Mobile.

You should make a note now that all the individual platforms here will be having the extensions for their references, as shown below.

Let's understand a few important things about Xamarin components and Nuget Packages.

Xamarin Components
  • These are built for Xamarin projects and we can use them in Xamarin Studio, Visual Studio etc.
  • It can support Android and iOS too.
  • It can be included on any NuGet package

So Xamarin Components give me something which I can use directly on the native platform of each individual.

NuGet Packages

  • Most of  the NuGet package is particularly designed for Visual Studio and .NET.
  • It is not specifically supported for iOS and Android.

Keynotes in Short

  • Adding Azure mobile to the clients:
  • About Xamarin components and NuGet packages.