Another problem I faced with while development of Unity plugin is Exception while HTTP request from the iOS platform. It produces such stacktrace:
ExecutionEngineException: Attempting to JIT compile method 'System.Reflection.MonoProperty:GetterAdapterFrame<Mono.Security.Protocol.Tls.HttpsClientStream, bool> (System.Reflection.MonoProperty/Getter`2<Mono.Security.Protocol.Tls.HttpsClientStream, bool>,object)' while running with --aot-only.
at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00000] in <filename unknown>:0
at System.Net.WebConnection.Write (System.Net.HttpWebRequest request, System.Byte[] buffer, Int32 offset, Int32 size, System.String& err_msg) [0x00000] in <filename unknown>:0
at System.Net.WebConnectionStream.WriteHeaders () [0x00000] in <filename unknown>:0
at System.Net.WebConnectionStream.SetHeaders (System.Byte[] buffer) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest.SendRequestHeaders (Boolean propagate_error) [0x00000] in <filename unknown>:0
Rethrow as AIServiceException: Attempting to JIT compile method 'System.Reflection.MonoProperty:GetterAdapterFrame<Mono.Security.Protocol.Tls.HttpsClientStream, bool> (System.Reflection.MonoProperty/Getter`2<Mono.Security.Protocol.Tls.HttpsClientStream, bool>,object)' while running with --aot-only.
System.Net.WebConnection.Write
method uses some reflection methods.
Quick search led me to this answer. But the highlighted answer suggests very complicated solution.
So, the another solution, that I found was to select "Api Compatibility Level"=".NET 2.0 Subset" in the Player Settings.
I had this problem in an android build with Unity 5.1.3. It was due to stripping.
Preserving class
System.Reflection.MonoProperty
fixed the problemHere is my link.xml file: