Skip to content

Commit

Permalink
Also fix event dictionary serialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
echo-branch committed Mar 28, 2024
1 parent aae88f3 commit dcbbb34
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Sources/BranchSDK/BranchEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit dcbbb34

Please sign in to comment.