-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for hard-coded nu-get Newtonsoft usage in C# SDK causing Unity IL2CPP builds to crash #219
Conversation
…PluggableLibrary implementations, remove duplicate/non-IJsonPluggableLibrary-based deserialization logic
IMPORTANT: Probably best to only review and not merge before 06.04.2024 when I come back since this needs a Unity counterpart anyway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -114,7 +114,7 @@ public SubscribeManager2(PNConfiguration pubnubConfig, IJsonPluggableLibrary jso | |||
if (!string.IsNullOrEmpty(responseTuple.Item1) && responseTuple.Item2 == null) | |||
{ | |||
PNStatus status = new PNStatus(null, PNOperationType.PNSubscribeOperation, PNStatusCategory.PNConnectedCategory, channels, channelGroups); | |||
HandshakeResponse handshakeResponse = JsonConvert.DeserializeObject<HandshakeResponse>(responseTuple.Item1); | |||
HandshakeResponse handshakeResponse = jsonLibrary.DeserializeToObject<HandshakeResponse>(responseTuple.Item1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
@@ -14,18 +12,18 @@ public class EmitMessagesHandler : EffectHandler<EmitMessagesInvocation> | |||
{ | |||
private readonly Dictionary<string, Type> channelTypeMap; | |||
private readonly Dictionary<string, Type> channelGroupTypeMap; | |||
private readonly JsonSerializer serializer; | |||
private readonly IJsonPluggableLibrary jsonPluggableLibrary; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
@pubnub-release-bot release as v6.20.1.0 |
🚀 Release successfully completed 🚀 |
fix: fix hard-coded nu-get Newtonsoft usage in C# SDK causing Unity IL2CPP builds to crash
Fixes issue of Unity SDK not being able to have a fully independent IJsonPluggableLibrary implementation because of direct nu-get Newtonsoft usage in C# SDK (Unity has it's own version that works with IL2CPP builds)