Closed cdauphinee closed 4 years ago
Hey @cdauphinee, thank you for reporting this and for your overall analysis on the library potential issues. Could you open a PR with your recommended fix? We (me and @imaji) will be more than happy to review it and move forward with this. Thank you.
@damdo @imaji Thanks for the response, I've put up https://github.com/pusher/pusher-websocket-dotnet/pull/77 for early feedback.
Resolved by #77
thanks cdauphinee. I am doing Replace the usage of dynamic in the EventEmitter callbacks with string as a way arround.
You could just make Unity not strip required code by using the following link.xml
<linker>
<assembly fullname="System.Core">
<type fullname="System.Linq.Expressions.Interpreter.LightLambda" preserve="all" />
</assembly>
</linker>
I have exactly the same error when i run my app on android il2cpp I don't know how to do this: -Replace internal deserialization to dynamic. -Replace the usage of dynamic in the EventEmitter callbacks with string I get my issue when i call the JObject.Parse(string) any help would be appreciated
I have a Unity 2019.2 project that builds for iOS, using the il2cpp scripting back-end. At run time, I receive the following exception whenever a
dynamic
is read or written to (i.e. receiving messages or subscribing to a presence channel):It seems like it's trying to do run-time code generation. To my knowledge, this isn't supported by il2cpp (and not allowed on iOS, even if it were supported). I suspect the same problem is also present on Android builds.
Looking at the code, I came up with two quick solutions that would fix this:
dynamic
(i.e. used for presence channels) with classes.dynamic
in the EventEmitter callbacks withstring
.Action<string>
andAction<dynamic>
overloads, though internally onlyAction<string>
is storedI have no problem making these changes myself, but I want to put this out there for discussion before opening a PR.