- Xamarin.Forms Projects
- Daniel Hindrikes Johan Karlsson David Ortinau
- 291字
- 2021-06-18 18:35:22
Xamarin platforms
The different Xamarin platforms available are Xamarin.iOS, Xamarin.Android, and Xamarin.Mac. In this section, we will take a look at each of them.
Xamarin.iOS
Xamarin.iOSis used to build apps for iOS with .NET and contains the bindings to theiOS APIs mentioned previously.Xamarin.iOS uses AOT compiling to compile the C# code into Advanced RISC Machine (ARM) assembly language. The Mono runtime runs alongside the Objective-C runtime. Code that uses .NET namespaces, such as System.LinqorSystem.Net, are executed by the Mono runtime, while code that uses iOS-specific namespaces are executed by the Objective-C runtime. Both the Mono runtime and the Objective-C runtime run on top of theX is Not Unix (XNU) Unix-likekernel(https://github.com/apple/darwin-xnu), which was developed by Apple. The following diagram shows an overview of the iOS architecture:

Xamarin.Android
Xamarin.Android is used to build apps for Android with .NET and contains bindings to the Android APIs. The Mono runtime and the Android Runtime (ART) run side by side on top of a Linux kernel. Xamarin.Android apps could either be Just-In-Time (JIT)-compiled or AOT-compiled, but to AOT-compile them, we need to use Visual Studio Enterprise.
Communication between the Mono runtime and ART occurs via a Java Native Interface (JNI) bridge. There are two types of JNI bridges—Manage Callable Wrapper (MCW) and Android Callable Wrapper (ACW). An MCW is used when code needs to run in ART and an ACW is used when ART needs to run code in the Mono runtime, as shown:

Xamarin.Mac
Xamarin.Mac is used to build apps for macOS with .NET and contains the bindings to the macOS APIs. Xamarin.Mac has the same architecture as Xamarin.iOS—t he only difference is that Xamarin.Mac apps are JIT-compiled, unlike Xamarin.iOS apps, which are AOT-compiled. This is shown in the following diagram:

- Linux運(yùn)維之道(第3版)
- Implementing Cisco UCS Solutions
- 網(wǎng)絡(luò)操作系統(tǒng):Windows Server 2003管理與應(yīng)用
- Google系統(tǒng)架構(gòu)解密:構(gòu)建安全可靠的系統(tǒng)
- Linux操作系統(tǒng)應(yīng)用編程
- 數(shù)據(jù)中心系統(tǒng)工程及應(yīng)用
- Java EE 8 Design Patterns and Best Practices
- 網(wǎng)絡(luò)操作系統(tǒng)教程:Windows Server 2016管理與配置
- 嵌入式實時操作系統(tǒng):RT-Thread設(shè)計與實現(xiàn)
- Learning BeagleBone
- Docker容器技術(shù)與應(yīng)用
- Learn Quantum Computing with Python and IBM Quantum Experience
- Mastering Eclipse Plug-in Development
- 數(shù)字系統(tǒng)設(shè)計與VHDL
- Windows PE權(quán)威指南