Latest

Sunday, July 29, 2018

Xamarin.Forms: How to install, Overview, Requirements and Create A Simple App

Overview

Xamarin.Forms – is a technology in Xamarin framework for .NET that allows you to create cross-platform, native UI and high-performance mobile applications for Android, iOS and UWP ( Windows 10 and Windows Phone with Windows 8.1 and higher) using C#, XAML and Visual Studio. 


Minimum Requirements:

MacOS:
  • MacOS El Capitano (10.11) or newer
  • iOS 10 SDK
  • Xcode 8

Windows:
  • Windows 7 or newer (Windows 10 for UWP development)
  • Visual Studio 2017 or newer
  • Windows 10 SDK ( For UWP development)

Installation

1. Download Visual Studio.

- Go to www.xamarin.com and click Download button
- Click “Download for Windows button” and choose Visual Studio 2017 type ( Community is a free one)


2. Execute the downloaded file and install Visual Studio Installer.



3. Make sure that “Mobile development with .NET” checkbox is selected.

4. Click the “Install” button in the lower-right corner.




5. When Visual Studio Installer finish installation click “Launch” button to launch Visual Studio 2017.

6. If you see this window – congratulations, you have successfully installed Visual Studio 2017 and Xamarin tools. To check if Xamarin is installed correctly click “Help” button in the top toolbar. If you see Xamarin option – everything is just fine.


Creating and Running a Simple Xamarin.Forms App:

1. In toolbar click “File”->”New”->”Project” (Or use the ctrl+shift+N shortcut). In appeared window choose Cross-Platform->Mobile App (Xamarin.Forms), choose the name for your project and click “OK” button.



2. From the template window, choose Blank App and select “.NET standard” as code sharing strategy. Click the “OK” button. Done! Your first Xamarin.Forms app ready to run.

Running UWP:
Choose <your_app_name>.UWP as startup project in the top toolbar and Local Machine as the device to run your solution. Click on a green triangular or press F5 key.




Android:
Choose <your_app_name>.Android as the startup project in top toolbar and Emulator or real device (should be connected to your computer) as the device to run your solution. Click on a green triangular or press F5 key.



iOS: 
Choose <your_app_name>.iOS as startup project in top toolbar and Simulator or real device (should be connected to your computer) as the device to run your solution. Click on a green triangular or press F5 key. Make Sure! You should have Mac to pair with Windows (Visual Studio). Otherwise, you cannot run the iOS project on Windows. If you have Mac, Visual Studio would show you a short three-step guide on how to pair with Mac. After you could easily run your iOS app.


No comments:

Post a Comment