📜 ⬆️ ⬇️

Mono brings C # to iPhone and Wii

A mono, open-source implementation of the .NET platform was used to develop games for the iPhone and Wii. Let's see how static compilation made it possible for applications on Mono to meet Apple's requirements for applications hosted on the App Store.

Mono - an open implementation of the .NET platform brought Microsoft development technologies to several unexpected platforms - iPhone, Android and Wii.

According to lead developer Mono from Novell Miguel de Icaza, a number of applications in the Apple App Store are developed using Mono. This will come as a surprise to those familiar with Apple’s policy of including applications in the AppStore, as Apple severely restricts developers to use interpreted languages ​​and third-party runtime environments — and these restrictions exclude the use of platforms such as .NET and Java.

Static compilation is a “feint-ears” that allows you to run Mono on the iPhone. Mono allows developers to use precompilation (ahead-of-time, AOT), which converts code in the .NET intermediate language (CIL) directly into native-code during compilation. This means that the application does not use compilation on the fly (Just-in-time, JIT) to generate native code during execution.
')
Also, there are a number of Mono tricks and chips that will allow developers to reduce the size of Mono applications and assemblies for deployment on mobile devices. You can use the Mono linker to reduce the size of the libraries, you can omit the JIT and the code generation engine from the executable applications and you can cut the CIL commands from the assemblies.

Static compilation makes it possible to create Apple-approved applications for the iPhone using Mono, but imposes certain restrictions. Generics and dynamically generated code are not supported when using AOT compilation.

There are still many difficulties to include in Mono the possibility of cross-compilation for the iPhone, but according to Miguel de Ikazy, developers who want to start right now can use Unity - a third-party commercial framework for developing 3D games that is built on Mono. Unity supports multiple platforms, including iPhone and Wii, and comes with Mono’s own built-in cross-compilation framework for various platforms.

In his blog post , Ikaza points out almost 40 applications (most of which are games) on the Apple's App Store which are built on Unity and Mono. He also writes about My Animal Center , a German game for Wii, which was also created using Mono and Unity.

However, not a single person is alive with an iPhone. Developers have experimentally ported the Mono runtime to the Android device T-Mobile G1. Although this port is just an experimental confirmation of the idea and cannot be used to deploy real applications on the platform in the near future, it has potential and looks good compared to Google's Dalvik in some preliminary tests.

Mono's great portability and expanded support for some features, such as static compilation, allow developers to use the platform in some completely new ways that Microsoft .NET implementations cannot use. This shows the importance and flexibility inherent in open implementations.

Source: https://habr.com/ru/post/50820/


All Articles