C# application on Apple IOS

匿名 (未验证) 提交于 2019-12-03 03:02:02

问题:

I have got C# .Net based applications. Is there any way I can run these applications for Apple IOS. I don’t have resources to develop all applications from scratch.

Many Thanks, Ni

回答1:

First of all, you can not just run your existing .NET programs unmodified on the iOS platform.

The .NET runtime does not work on iOS, nor will it (in relation to current app guidelines regarding runtime compilation). Mono has the same fate and will not run on the iOS platform.

Your only option is to get the code compiled to native iOS executables, and this will involve 3rd party tools.

One of those is the MonoTouch product. It is not free.

Note that this is not a technical limitation. The .NET runtime could run on the iOS platform if Microsoft, or Mono made it for that platform, but Apple does not allow such runtimes (the ones that download/execute not-yet-100%-compiled code) on their platform at all.

This is the same problem that prevents Flash from executing on the platform. The way Flash has gone to solve this is to compile the Flash programs to native iOS executables.



回答2:

You can use the tools made by the mono project.

These will not support all of the MS namespaces (non of the windows specific ones, such as WMI) and your application code needs to be written to be cross platform (so using Path.Combine for directory paths instead of concatenations).

Try the MoMA tools to see if your code is cross platform and get recommendations for fixing it if it is not.



回答3:

Take a look at Xamarin for IOS. Integrates nicely with Visual Studio otherwise you can use its own IDE.

You can also reference .net assemblies. Hope this helps.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!