Skip to content

Commit bf539d0

Browse files
committed
add campaign to link properties
1 parent f4bc163 commit bf539d0

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

Branch-SDK/Branch-SDK/BranchConstants.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ extern NSString * const BRANCH_REQUEST_KEY_URL_ALIAS;
3232
extern NSString * const BRANCH_REQUEST_KEY_URL_CHANNEL;
3333
extern NSString * const BRANCH_REQUEST_KEY_URL_FEATURE;
3434
extern NSString * const BRANCH_REQUEST_KEY_URL_STAGE;
35+
extern NSString * const BRANCH_REQUEST_KEY_URL_CAMPAIGN;
3536
extern NSString * const BRANCH_REQUEST_KEY_URL_DURATION;
3637
extern NSString * const BRANCH_REQUEST_KEY_URL_DATA;
3738
extern NSString * const BRANCH_REQUEST_KEY_URL_IGNORE_UA_STRING;

Branch-SDK/Branch-SDK/BranchConstants.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
NSString * const BRANCH_REQUEST_KEY_URL_CHANNEL = @"channel";
3333
NSString * const BRANCH_REQUEST_KEY_URL_FEATURE = @"feature";
3434
NSString * const BRANCH_REQUEST_KEY_URL_STAGE = @"stage";
35+
NSString * const BRANCH_REQUEST_KEY_URL_CAMPAIGN = @"campaign";
3536
NSString * const BRANCH_REQUEST_KEY_URL_DURATION = @"duration";
3637
NSString * const BRANCH_REQUEST_KEY_URL_DATA = @"data";
3738
NSString * const BRANCH_REQUEST_KEY_URL_IGNORE_UA_STRING = @"ignore_ua_string";

Branch-SDK/Branch-SDK/BranchLinkProperties.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
@property (nonatomic, strong) NSString *alias;
1616
@property (nonatomic, strong) NSString *channel;
1717
@property (nonatomic, strong) NSString *stage;
18+
@property (nonatomic, strong) NSString *campaign;
1819
@property (nonatomic) NSUInteger matchDuration;
1920
@property (nonatomic, strong) NSDictionary *controlParams;
2021

Branch-SDK/Branch-SDK/BranchLinkProperties.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ + (BranchLinkProperties *)getBranchLinkPropertiesFromDictionary:(NSDictionary *)
4545
if (dictionary[[NSString stringWithFormat:@"~%@", BRANCH_REQUEST_KEY_URL_STAGE]]) {
4646
linkProperties.stage = dictionary[[NSString stringWithFormat:@"~%@", BRANCH_REQUEST_KEY_URL_STAGE]];
4747
}
48+
if (dictionary[[NSString stringWithFormat:@"~%@", BRANCH_REQUEST_KEY_URL_CAMPAIGN]]) {
49+
linkProperties.campaign = dictionary[[NSString stringWithFormat:@"~%@", BRANCH_REQUEST_KEY_URL_CAMPAIGN]];
50+
}
4851
if (dictionary[[NSString stringWithFormat:@"~%@", BRANCH_REQUEST_KEY_URL_DURATION]]) {
4952
linkProperties.matchDuration = [dictionary[[NSString stringWithFormat:@"~%@", BRANCH_REQUEST_KEY_URL_DURATION]] intValue];
5053
}
@@ -64,7 +67,7 @@ + (BranchLinkProperties *)getBranchLinkPropertiesFromDictionary:(NSDictionary *)
6467
}
6568

6669
- (NSString *)description {
67-
return [NSString stringWithFormat:@"BranchLinkProperties | tags: %@ \n feature: %@ \n alias: %@ \n channel: %@ \n stage: %@ \n matchDuration: %lu \n controlParams: %@", self.tags, self.feature, self.alias, self.channel, self.stage, (long)self.matchDuration, self.controlParams];
70+
return [NSString stringWithFormat:@"BranchLinkProperties | tags: %@ \n feature: %@ \n alias: %@ \n channel: %@ \n stage: %@ \n campaign: %@ \n matchDuration: %lu \n controlParams: %@", self.tags, self.feature, self.alias, self.channel, self.stage, self.campaign, (long)self.matchDuration, self.controlParams];
6871
}
6972

7073
@end

0 commit comments

Comments
 (0)