Skip to content

Commit

Permalink
Merge pull request #42 from boxfish/master
Browse files Browse the repository at this point in the history
reset universal_link_url/link_click_identifier after consumed
  • Loading branch information
aaustin committed Feb 18, 2016
2 parents 9e7d97e + b36ea25 commit 1c6fa92
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cordova-src/ios/BNCDevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ - (void)getInstallData:(CDVInvokedUrlCommand *)command {
if (updateState) {
[post setObject:updateState forKeyedSubscript:@"update"];
}
if (link_click_identifier) [post setObject:link_click_identifier forKey:@"link_identifier"];
if (link_click_identifier) {
[post setObject:link_click_identifier forKey:@"link_identifier"];
link_click_identifier = nil;
}
[post setObject:[NSNumber numberWithBool:[BNCDevice adTrackingSafe]] forKey:@"ad_tracking_enabled"];
if (isReferrable < 0) {
[post setObject:[NSNumber numberWithInteger:(updateState == nil)?1:0] forKey:@"is_referrable"];
Expand All @@ -82,6 +85,7 @@ - (void)getInstallData:(CDVInvokedUrlCommand *)command {
}
if (universal_link_url) {
[post setObject:universal_link_url forKey:@"universal_link_url"];
universal_link_url = nil;
}

CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:post];
Expand All @@ -106,9 +110,13 @@ - (void)getOpenData:(CDVInvokedUrlCommand *)command {
} else {
[post setObject:[NSNumber numberWithInt:isReferrable] forKey:@"is_referrable"];
}
if (link_click_identifier) [post setObject:link_click_identifier forKey:@"link_identifier"];
if (link_click_identifier) {
[post setObject:link_click_identifier forKey:@"link_identifier"];
link_click_identifier = nil;
}
if (universal_link_url) {
[post setObject:universal_link_url forKey:@"universal_link_url"];
universal_link_url = nil;
}

CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:post];
Expand Down

0 comments on commit 1c6fa92

Please sign in to comment.