- Home /
Json . NET, iOS and AOT
Have anyone managed to get Json . NET (Newtonsoft JSON library) to work with Unity on iOS?
When I try to deserialize my VostopiaSkinnedMesh class my data on iOS, I get the dreaded
System.ExecutionEngineException: Attempting to JIT compile method
'(wrapper dynamic-method) VostopiaSkinnedMesh:CreateVostopiaSkinnedMesh ()'
while running with --aot-only.
Others have reported to get Json . NET working with MonoTouch, but I don't know what, if any, differences there are with the mono touch AOT approach to the Unity AOT aproach?
I've tried the usual, making sure my constructor isn't omitted by the AOT compiler by making explicit calls to it, but the AOT compiler doesn't want to play. Any suggestions?
cheers, -Tore
edited to avoid link generation in json . net name
Hey, I am having this same problem trying to get JTCore working on iOS. Did you ever find a solution? If I find anything I'll let you know. I'm thinking it might be related to using Lambda expressions.
I didn't figure out what went wrong, but I found a port of json.net to monotouch that I managed to port to unity
Answer by zirker09 · Dec 09, 2015 at 06:52 PM
Are you using an AOT version of Json.Net? The dll needs to be compiled with AOT in mind. If you want it to just work there is a specific Unity version of Json.NET https://www.assetstore.unity3d.com/en/#!/content/11347
It compiles based on your build target and professes to work on iOS, I haven't tried iOS it yet.
Your answer
Follow this Question
Related Questions
Json.NET Serialization - Platform Not Supported Error 0 Answers
Json Parsing iOS with depth of json is 6. 0 Answers
Loading json file from Addressables on iOS 0 Answers
how to deserialize json with arbitrary string keys using JsonUtility(unity c#)? 4 Answers
[SCREENSHOTS]Save scenes using XML/json descriptor 0 Answers