镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Could not get it run on iOS device #186

Closed

Description

@o0160o

I wrote a test case like this.
Test.cs.zip
This it what i got:

Unhandled Exception: System.InvalidOperationException: An AOT error is occurred. MessagePackSerializer.PrepareType<System.Int32> is should be called in advance. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: An AOT error is occurred. MessagePackSerializer.PrepareType<System.Int32> is should be called in advance. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ExecutionEngineException: Attempting to call method 'MsgPack.Serialization.SerializationContext::GetSerializer' for which no ahead of time (AOT) code was generated.

I couldn't get it run on iOS device.
Do you have any suggestions? Thank you in advance!

Activity

  1. yfakariya commented on Sep 23, 2016

    @yfakariya
    Member

    Sorry for delay.
    Unfortunately, you must prepare all types you used except you use pre-generated serializers (which can do with mpu.exe).

    I reproduced and then put following code, it worked well:

    // start adding --
    MsgPack.Serialization.MessagePackSerializer.PrepareType<int>();
    MsgPack.Serialization.MessagePackSerializer.PrepareType<string>();
    MsgPack.Serialization.MessagePackSerializer.PrepareType<AData>();
    MsgPack.Serialization.MessagePackSerializer.PrepareType<BData>();
    // -- end adding
    MsgPack.Serialization.MessagePackSerializer.PrepareType<Dat>();
  2. o0160o commented on Sep 23, 2016

    @o0160o
    Author

    Thank you very much!

    On Friday, September 23, 2016, Yusuke Fujiwara notifications@github.com
    wrote:

    Sorry for delay.
    Unfortunately, you must prepare all types you used except you use
    pre-generated serializers (which can do with mpu.exe).

    I reproduced and then put following code, it worked well:

    // start adding --
    MsgPack.Serialization.MessagePackSerializer.PrepareType();
    MsgPack.Serialization.MessagePackSerializer.PrepareType();
    MsgPack.Serialization.MessagePackSerializer.PrepareType();
    MsgPack.Serialization.MessagePackSerializer.PrepareType();// -- end adding
    MsgPack.Serialization.MessagePackSerializer.PrepareType();

    —
    You are receiving this because you authored the thread.
    Reply to this email directly, view it on GitHub
    #186 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/AK7KXgXutl9h82Vs6LVMJs6k1dRQStgcks5qs6QngaJpZM4J-qId
    .

  3. yfakariya commented on Sep 24, 2016

    @yfakariya
    Member

    No problem!
    I close this because it looks solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions