Serialization iOS

I am trying to serialize Dictionary<string, List > and on a computer it works fine, but on iOS i get

“Unhandled Exception: System.ExecutionEngineException: Attempting to JIT compile method ‘System.Collections.Generic.Dictionary2<string, System.Collections.Generic.List1>:smile:o_CopyTo<System.Collections.Generic.KeyValuePair2<string, System.Collections.Generic.List1>, System.Collections.Generic.KeyValuePair2<string, System.Collections.Generic.List1>> (System.Collections.Generic.KeyValuePair2<string, System.Collections.Generic.List1>[ ],int,System.Collections.Generic.Dictionary2/Transform1<string, System.Collections.Generic.List1<int>, System.Collections.Generic.KeyValuePair2<string, System.Collections.Generic.List`1>>)’ while running with --aot-only.”

I tried Dictionary<string, int[ ] > and it works on iOS and computer.

Have anybody had similar problem?

Well, I’m curious to hear the answer to this too. I was having so many problems with Serialization on iOS I ended up writing a whole stack with reflection to deal with serialization in our project.

It might help to have a look at some source, though.

Since when does Dictionary serialize at all when you do it with auto serialization. Would be new to me.

Thats why the SerializableDictionary exists (if you search for it with google it will near always everywhere be the first hit :)), which also works on AOT systems like the iOS.