Skip to content

Commit f0f5047

Browse files
committed
add campaign to testbed
1 parent 0241630 commit f0f5047

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Branch-TestBed/Branch-TestBed/ViewController.m

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ - (IBAction)createBranchLinkButtonTouchUpInside:(id)sender {
6565
BranchLinkProperties *linkProperties = [[BranchLinkProperties alloc] init];
6666
linkProperties.feature = feature;
6767
linkProperties.channel = channel;
68+
linkProperties.campaign = @"some campaign";
6869
[linkProperties addControlParam:@"$desktop_url" withValue: desktop_url];
6970
[linkProperties addControlParam:@"$ios_url" withValue: ios_url];
7071

@@ -181,17 +182,17 @@ - (IBAction)simulateContentAccessButtonTouchUpInsideButtonTouchUpInside:(id)send
181182
- (IBAction)shareLinkButtonTouchUpInside:(id)sender {
182183
BranchLinkProperties *linkProperties = [[BranchLinkProperties alloc] init];
183184
linkProperties.feature = feature;
185+
linkProperties.campaign = @"sharing campaign";
184186
[linkProperties addControlParam:@"$desktop_url" withValue: desktop_url];
185187
[linkProperties addControlParam:@"$ios_url" withValue: ios_url];
186188

187-
[self.branchUniversalObject showShareSheetWithShareText: shareText
188-
completion:^(NSString *activityType, BOOL completed) {
189-
if (completed) {
190-
NSLog(@"%@", [NSString stringWithFormat:@"Branch TestBed: Completed sharing to %@", activityType]);
191-
} else {
192-
NSLog(@"%@", [NSString stringWithFormat:@"Branch TestBed: Sharing failed"]);
193-
}
194-
}];
189+
[self.branchUniversalObject showShareSheetWithLinkProperties:linkProperties andShareText:shareText fromViewController:self.parentViewController completion:^(NSString *activityType, BOOL completed) {
190+
if (completed) {
191+
NSLog(@"%@", [NSString stringWithFormat:@"Branch TestBed: Completed sharing to %@", activityType]);
192+
} else {
193+
NSLog(@"%@", [NSString stringWithFormat:@"Branch TestBed: Sharing failed"]);
194+
}
195+
}];
195196
}
196197

197198

0 commit comments

Comments
 (0)