.NET to Xamarin iOS?

chairmanPC

Active member
Joined
Apr 19, 2021
Messages
38
Programming Experience
10+
Trying to port a C# winform .NET project to Xamarin iOS version. I wonder if it's possible to do so.
 
It depends. Is it purely a WinForms program, or does it just happen to use WinForms as a shell but does a lot of Windows specific things like calling native methods, send messages, or do other platform specific stuff?
 
It depends what you mean by "port". You will have to build a new UI but you may well be able to use some or all of the same libraries, so make sure as much of your code is in platform-independent libraries as possible.
 
Short answer is yes, with moderate difficulty!

What the Jm and Skydiver are saying regarding "depends" and to elaborate... It depends on your code, and whether or not you write code properly, by using API's correctly, interfaces, etc. All of these will not be portable since iOS has different targeted API's and you will need to rewire them. Your UI can not be ported, and this will require you to build your UI from scratch as there is no magic tools that can do this for you. You can use the The .NET Portability Analyzer - .NET to analyse your current project, and this will tell (roughly) how much of your current application can be ported to your target platform. In iOS, you will use native iOS design surfaces or storyboards to build up your ui, as xaml is mainly used in forms development. While this will be a new experience, its nothing you can't learn.
 
Back
Top Bottom