From c114e122571f5a4b8511ad7b4cbc6a92baef4e4b Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Wed, 2 Oct 2024 20:02:25 -0700 Subject: [PATCH] Added encoding for requestUUID and requestCreationTimeStamp --- Sources/BranchSDK/BNCServerRequest.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Sources/BranchSDK/BNCServerRequest.m b/Sources/BranchSDK/BNCServerRequest.m index 4bd18c429..8895cbfd0 100644 --- a/Sources/BranchSDK/BNCServerRequest.m +++ b/Sources/BranchSDK/BNCServerRequest.m @@ -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 {