Xamarin Technical Documentation ------ vs multi-platform development

Source: Internet
Author: User

This technology is only for your reference in your spare time and does not involve any in-depth research. Developers with a certain degree of Development Foundation should be able to get started quickly.

 

I. Introduction

Xamarin was founded in 2011 and aims to make mobile development incredibly fast and simple. Xamarin simplifies application development for multiple platforms, including IOS, Android, Windows Phone, and Mac apps. Xamarin was created and participated by many well-known open-source community developers and is also the leader of Mono projects-C # And. NET Framework open-source and cross-platform implementation.

As a cross-platform development framework, xamarin. Mobile has many advantages. In this framework, IOS, Android, Windows Phone, and Mac apps can be developed without switching to eclipse or purchasing Mac and using xcode, in Visual Studio, C # And.. NET Framework.

 

2. xamarin Development

Xamarin studio is an integrated development environment for developing cross-platform applications in C # language. It is closely integrated with iOS and Android sdks. Xamarin Studio provides many features required for modern development, including code completion, debugger, packaging, and publishing applications (applications can be published through testflight ). For Android, xamarin also contains its own UI Builder (for iOS, the UI builder of Apple xcode is used), and git and subversion are integrated. Developers can use xamarin studio to test mobile apps and debug bugs on simulators and real machines. Xamarin studio perfectly supports Windows and Mac. Visual Studio

Xamarin also provides the for vs2010 vs2012 plug-in, which is attractive. This plug-in can be well integrated with Microsoft's ecosystem, and can be remotely debugged and tested on the Mac OS simulator. On Mac OS, due to the existing restrictions of iOS, C # code for iOS is directly compiled into arm assembly code through AOT compilation technology. On Android, applications are converted to Il, and JIT compilation is performed at startup.

However, the plug-in only contains Android/IOS projects, but not any projects on other platforms. The compilation and debugging of IOS projects require xcode support. It means that a MAC system and xcode environment and an auxiliary software xamarin installed on Mac are also required. IOS, xamarin. IOS is a software running on Mac. It is used to compile and debug the software, and reflects the result to the IDE through socket communication. However, this software is not officially available for download or trial use. It is the privilege of purchasing authorized users.

 

Enter the subject below:

What I want to talk about is how to use the xamarin plug-in to develop Android and iOS projects in vs2010 and later versions.

The following uses android as an example:

First, install the xamarininstaller.exe application on a Windows computer. (For example, Figure 1-1)

(Figure: 1-1)

After the installation is complete, open vs2010 and click "file"-"New"-"project". We can see that you have created Android and iOS projects. (For example, Figure 1-2)

 

(Figure: 1-2)

Now let's create an android project. (For example, Figure 1-3)

 

(Figure: 1-3)

In Figure 1-3,

The left-side Toolbox provides some common controls for project development.

The solution project-"resources"-"layout"-Main. axml page on the right is the home page of the project.

The post code is written in the mainactivity. CS file. (For example, Figure 1-4)

 

(Figure: 1-4)

Pay attention to the following two aspects:

First, after you drag and drop the control on the interface, you must generate a new solution each time before writing the post code. In this way, the control instance you drag and drop on the interface will be generated in the "Resources"-resource. Designer. CS file. Then you can find the control in the background code.

2. When debugging the android project, there must be three corresponding versions. (For example, the following three images)

After the three versions match, press F5 to display the android Simulator Interface (for example, Figure 1-5)

 

(Figure: 1-5)

 

I will introduce it here. If you are interested, you can study it in depth.

The following links are provided:

Http://xamarin.csdn.net/

Http://msdn.microsoft.com/zh-tw/vstudio/dn394307.aspx

Http://www.cnblogs.com/shanyou/archive/2013/02/21/2921301.html

 

Technical Research, Author: Chen Haibo

Time: 2014.5.29

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.