4 ms·
I have for a couple of projects. Overall, I loved it. It allowed us to share code on iOS, Android and Windows Phone (though we wrote native UIs separately, in C
by lars 13y ago
I have for a couple of projects. Overall, I loved it. It allowed us to share code on iOS, Android and Windows Phone (though we wrote native UIs separately, in C#). Plus C# is a great language, and Visual Studio is a great IDE.
It's not perfect though:
- On Android, there's a limit to how many Java Native Interface objects you can have (40000 I believe). This sets a hard limit to how many object you can have that wrap Java objects, so for instance you can't have 40000 UI objects at the same time. It's possible to run into this problem, but you can work around it by working in Java for those parts.
- On iOS there are ways in which the Mono GC can free objects that are referenced by the native objects, but not by the C# code. For instance, you could pass a lambda to be called when a button gets clicked. This lambda (or something it references) gets freed, and when the button is clicked it tries to call C# code that's gone. This causes some really nasty bugs, and should IMO be considered a bug as it really breaks the expectations one has when coding in a managed language.
- BenSS 13y agoI've been bitten buy similar bugs in Mono, it's really frustrating. I do like the availability of Linq though. Also coming from native iOS, debugging seems really clunky to me. It's very easy to reach a state where the IDE just goes "welp, I have no idea what's in scope right now".