Commit 824cf268 authored by Bosko Petreski's avatar Bosko Petreski Committed by Bosko Petreski

#34 - added getters for SID and DID

parent 7da66330
......@@ -30,6 +30,7 @@ typedef NS_ENUM(NSUInteger, ScrollDirection) {
NSInteger heartbeatIncrement;
NSMutableArray *savedPayloads;
NSString *sid;
NSString *did;
CLLocation *currLocation;
NSString *externalIPAddress;
}
......@@ -132,4 +133,8 @@ typedef NS_ENUM(NSUInteger, ScrollDirection) {
*/
-(void)trackConvert:(NSDictionary<NSString*,id> *)data;
// Getters
-(NSString *)getDID;
-(NSString *)getSID;
@end
......@@ -58,7 +58,7 @@
dictionaryWithDictionary:@{@"apikey":Primed.sharedInstance.public_key,
@"ts":@(NSDate.date.timeIntervalSince1970),
@"sid":sid,
@"did":UIDevice.currentDevice.identifierForVendor.UUIDString,
@"did":did,
@"source":@"APP",
@"sdkId":@(1),
@"sdkVersion":@"2.1.0-beta12",
......@@ -102,6 +102,7 @@
}
sid = [[NSUUID UUID] UUIDString];
did = UIDevice.currentDevice.identifierForVendor.UUIDString;
externalIPAddress = self.getExternalIP;
}
......@@ -253,4 +254,12 @@
[self emitPayload:payload];
}
#pragma mark - Getters
-(NSString *)getDID{
return did;
}
-(NSString *)getSID{
return sid;
}
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment