From dcbbb34951363d9da02f63f6d8ce0a46687d46fa Mon Sep 17 00:00:00 2001 From: echo Date: Wed, 27 Mar 2024 23:32:01 -0700 Subject: [PATCH] Also fix event dictionary serialization. --- Sources/BranchSDK/BranchEvent.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Sources/BranchSDK/BranchEvent.m b/Sources/BranchSDK/BranchEvent.m index 257d4524c..0dd108ef1 100644 --- a/Sources/BranchSDK/BranchEvent.m +++ b/Sources/BranchSDK/BranchEvent.m @@ -134,8 +134,11 @@ - (instancetype)initWithCoder:(NSCoder *)decoder { self = [super initWithCoder:decoder]; if (!self) return self; - self.serverURL = [decoder decodeObjectOfClass:NSURL.class forKey:@"serverURL"]; - self.eventDictionary = [decoder decodeObjectOfClass:NSDictionary.class forKey:@"eventDictionary"]; + self.serverURL = [decoder decodeObjectOfClass:NSURL.class forKey:@"serverURL"]; + + NSSet *classes = [NSSet setWithArray:@[NSDictionary.class, NSArray.class, NSString.class, NSNumber.class]]; + self.eventDictionary = [decoder decodeObjectOfClasses:classes forKey:@"eventDictionary"]; + return self; }