Skip to content

Commit

Permalink
Added encoding for requestUUID and requestCreationTimeStamp
Browse files Browse the repository at this point in the history
  • Loading branch information
NidhiDixit09 committed Oct 3, 2024
1 parent 6ce62d1 commit c114e12
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Sources/BranchSDK/BNCServerRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,17 @@ - (void)processResponse:(BNCServerResponse *)response error:(NSError *)error {
}

- (id)initWithCoder:(NSCoder *)aDecoder {
return self = [super init];
self = [super init];
if (self) {
self.requestUUID = [aDecoder decodeObjectOfClass:NSString.class forKey:@"requestUUID"];
self.requestCreationTimeStamp = [aDecoder decodeObjectOfClass:NSNumber.class forKey:@"requestCreationTimeStamp"];
}
return self;
}

- (void)encodeWithCoder:(NSCoder *)coder {
// Nothing going on here
[coder encodeObject:self.requestUUID forKey:@"requestUUID"];
[coder encodeObject:self.requestCreationTimeStamp forKey:@"requestCreationTimeStamp"];
}

- (void)safeSetValue:(NSObject *)value forKey:(NSString *)key onDict:(NSMutableDictionary *)dict {
Expand Down

0 comments on commit c114e12

Please sign in to comment.