Commit 9f0ced60 authored by Bosko Petreski's avatar Bosko Petreski

#53 nil values fixes in functions

parents fe9f8bc0 fe9f8bc0
PODS:
- PrimedIO (0.0.2):
- PrimedIO (0.0.4):
- Socket.IO-Client-Swift (~> 13.3.0)
- Socket.IO-Client-Swift (13.3.1):
- Starscream (~> 3.0.2)
......@@ -18,7 +18,7 @@ EXTERNAL SOURCES:
:path: "../"
SPEC CHECKSUMS:
PrimedIO: 5ae65f4e7f8d856ee073faebbfe12472e6955b0a
PrimedIO: a08abf01bb96b4bb496ac06a003ba4a23cf3b0ff
Socket.IO-Client-Swift: 79f8f85fa44881838175a20f9bd2c32bef2c9d37
Starscream: ef3ece99d765eeccb67de105bfa143f929026cf5
......
{
"name": "PrimedIO",
"version": "0.0.2",
"version": "0.0.4",
"summary": "IOS SDK for retrieving predictions from the Primed Backend, as well as track behavior",
"description": "IOS SDK for retrieving predictions from the Primed Backend, as well as track behavior.",
"homepage": "https://gitlab.com/primedio/delivery-primedios",
......@@ -13,7 +13,7 @@
},
"source": {
"git": "https://gitlab.com/primedio/delivery-primedios.git",
"tag": "0.0.2"
"tag": "0.0.4"
},
"platforms": {
"ios": "9.0"
......
PODS:
- PrimedIO (0.0.2):
- PrimedIO (0.0.4):
- Socket.IO-Client-Swift (~> 13.3.0)
- Socket.IO-Client-Swift (13.3.1):
- Starscream (~> 3.0.2)
......@@ -18,7 +18,7 @@ EXTERNAL SOURCES:
:path: "../"
SPEC CHECKSUMS:
PrimedIO: 5ae65f4e7f8d856ee073faebbfe12472e6955b0a
PrimedIO: a08abf01bb96b4bb496ac06a003ba4a23cf3b0ff
Socket.IO-Client-Swift: 79f8f85fa44881838175a20f9bd2c32bef2c9d37
Starscream: ef3ece99d765eeccb67de105bfa143f929026cf5
......
This diff is collapsed.
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.0.2</string>
<string>0.0.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -193,8 +193,8 @@
[self trackView:uri customProperties:@{}];
}
-(void)trackView:(NSString *)uri customProperties:(NSDictionary<NSString*,id> *)customProperties{
NSDictionary *payload = [self basicEventProperties:@"view" eventObject:@{@"uri":uri,
@"customProperties":customProperties
NSDictionary *payload = [self basicEventProperties:@"view" eventObject:@{@"uri":(uri ?: @""),
@"customProperties":(customProperties ?: @{})
}];
[self emitPayload:payload];
}
......@@ -227,7 +227,7 @@
-(void)trackStart:(NSString *)uri customProperties:(NSDictionary<NSString*,id> *)customProperties{
NSDictionary *payload = [self basicEventProperties:@"start" eventObject:@{@"ua":self.getUA,
@"now":self.getDate_iso8601,
@"uri":uri,
@"uri":(uri ?: @""),
@"screenWidth":@(UIScreen.mainScreen.bounds.size.width),
@"screenHeight":@(UIScreen.mainScreen.bounds.size.height),
@"viewPortWidth":@(UIScreen.mainScreen.bounds.size.width),
......@@ -244,15 +244,15 @@
[self emitPayload:payload];
}
-(void)trackCustomEvent:(NSString *)eventType customProperties:(NSDictionary<NSString*,id> *)customProperties{
NSDictionary *payload = [self basicEventProperties:eventType eventObject:customProperties];
NSDictionary *payload = [self basicEventProperties:(eventType ?: @"") eventObject:(customProperties ?: @{})];
[self emitPayload:payload];
}
-(void)trackPersonalise:(NSDictionary<NSString*,id> *)data{
NSDictionary *payload = [self basicEventProperties:@"personalise" eventObject:data];
NSDictionary *payload = [self basicEventProperties:@"personalise" eventObject:(data ?: @{})];
[self emitPayload:payload];
}
-(void)trackConvert:(NSDictionary<NSString*,id> *)data{
NSDictionary *payload = [self basicEventProperties:@"convert" eventObject:data];
NSDictionary *payload = [self basicEventProperties:@"convert" eventObject:(data ?: @{})];
[self emitPayload:payload];
}
......
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