Skip to content

Commit ff97509

Browse files
committed
remove identity_id for spotlight url reqequests
1 parent 2384b04 commit ff97509

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

Branch-SDK/Branch-SDK/BranchUniversalObject.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ typedef NS_ENUM(NSInteger, ContentIndexMode) {
4343
- (void)registerView;
4444
- (void)registerViewWithCallback:(callbackWithParams)callback;
4545

46-
4746
- (void)userCompletedAction:(NSString *)action;
4847

4948
- (NSString *)getShortUrlWithLinkProperties:(BranchLinkProperties *)linkProperties;

Branch-SDK/Branch-SDK/BranchUniversalObject.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ + (BranchUniversalObject *)getBranchUniversalObjectFromDictionary:(NSDictionary
321321
if (dictionary[BRANCH_LINK_DATA_KEY_KEYWORDS]) {
322322
universalObject.keywords = dictionary[BRANCH_LINK_DATA_KEY_KEYWORDS];
323323
}
324+
if (dictionary[BNCPurchaseAmount]) {
325+
universalObject.price = [dictionary[BNCPurchaseAmount] floatValue];
326+
}
324327

325328
return universalObject;
326329
}

Branch-SDK/Branch-SDK/Requests/BranchShortUrlRequest.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
@interface BranchShortUrlRequest : BNCServerRequest
1313

14+
@property (nonatomic, assign) BOOL isSpotlightRequest;
15+
1416
- (id)initWithTags:(NSArray *)tags alias:(NSString *)alias type:(BranchLinkType)type matchDuration:(NSInteger)duration channel:(NSString *)channel feature:(NSString *)feature stage:(NSString *)stage campaign:(NSString *)campaign params:(NSDictionary *)params linkData:(BNCLinkData *)linkData linkCache:(BNCLinkCache *)linkCache callback:(callbackWithUrl)callback;
1517

1618
@end

Branch-SDK/Branch-SDK/Requests/BranchShortUrlRequest.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ - (id)initWithTags:(NSArray *)tags alias:(NSString *)alias type:(BranchLinkType)
4444
_callback = callback;
4545
_linkCache = linkCache;
4646
_linkData = linkData;
47+
_isSpotlightRequest = NO;
4748
}
4849

4950
return self;
@@ -54,7 +55,10 @@ - (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key ca
5455

5556
BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper preferenceHelper];
5657
params[BRANCH_REQUEST_KEY_DEVICE_FINGERPRINT_ID] = preferenceHelper.deviceFingerprintID;
57-
params[BRANCH_REQUEST_KEY_BRANCH_IDENTITY] = preferenceHelper.identityID;
58+
59+
if (!_isSpotlightRequest) {
60+
params[BRANCH_REQUEST_KEY_BRANCH_IDENTITY] = preferenceHelper.identityID;
61+
}
5862
params[BRANCH_REQUEST_KEY_SESSION_ID] = preferenceHelper.sessionID;
5963

6064
[serverInterface postRequest:params url:[preferenceHelper getAPIURL:BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL] key:key callback:callback];

Branch-SDK/Branch-SDK/Requests/BranchSpotlightUrlRequest.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ - (id)initWithParams:(NSDictionary *)params callback:(callbackWithParams)callbac
2222
[linkData setupChannel:@"spotlight"];
2323

2424
if (self = [super initWithTags:nil alias:nil type:BranchLinkTypeUnlimitedUse matchDuration:0 channel:@"spotlight" feature:BRANCH_FEATURE_TAG_SHARE stage:nil campaign:nil params:params linkData:linkData linkCache:nil callback:nil]) {
25+
self.isSpotlightRequest = YES;
2526
_spotlightCallback = callback;
2627
}
27-
28+
2829
return self;
2930
}
3031

0 commit comments

Comments
 (0)