- Home /
Is there an up-to-date list of .NET limitations on iOS?
When I'm looking up C# documentation, I often don't know if a particular feature is supported by Unity (I understand it's .NET 3.5?). In particular I need to know if these features are supported on iOS, as I have reason to believe that they will work fine in the editor, but when building for the device will result in the device crashing with no explanation. (It's happened to me before.)
If anyone can point me to a wiki page or something that has up-to-date info on this, it would be brilliant.
Specifically, I need to know if the following features are completely supported on iOS (or partially supported)? I'm just learning these things and using a bunch of them in my code, but I'm worried I'll put it all together for a first build trial and get a crash.
Extension Methods Custom Extension Methods Linq Lambda Expressions System.Diagnostics.Stopwatch
Answer by rutter · May 30, 2013 at 05:03 AM
I'm not sure if there's any central list, but these are useful ones:
Mono Compatibility lists features which are/aren't included at various API compatibility levels. This is one of the best links I've found.
Using .NET API 2.0 compatibility level mentions a bit about compatibility levels on mobile devices.
Features currently not supported by Unity iOS sounds useful, but I can't say how up-to-date it is.
One important note: any feature relying on JIT compilation will break on iOS; it's a limitation of the platform, not Unity's fault, as far as I understand it. You'll usually only run into this if you're using System.Reflection, elaborate template classes, or libraries relying on either of the above.
Reflection is right out, but you can sometimes get around template problems by figuring out which permutation of template params is throwing an exception, including that permutation in static code, and thereby forcing Unity to compile it "ahead of time" (AOT).
Thanks! That's a great start for research. So in the first page you link to -- if I understand correctly -- if I use any of the classes or methods that are NOT supported by 2.0 subset, then I should compile using 2.0? (Or find another way that is supported by the subset?) And the advantage of compiling using the subset is smaller filesize and quicker load time?
And what is '$$anonymous$$icro' on that page? Is that the same as mscorlib? Not sure I understand what that/those are...
Oh and another thing - I see namespaces are not supported on iOS... does this mean I can't create custom extension methods? Do I have to put them in a namespace?
Okay, I just tested and found you don't have to put custom extension methods in a namespace, so I'm guessing they're okay...
Your answer
Follow this Question
Related Questions
GUI textures - hide other guitextures/ objects 0 Answers
Access to path /???? is denied on Mac OS 2 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
iOS and MySQL : PHP or .NET Plugin ? 0 Answers
What is the most practical way to convert NPOT textures to POT for an almost finished game? 5 Answers