File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
Examples/TestBed-macOS/TestBed-macOS Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ - (NSDictionary*) dictionary {
6060 addInteger (matchDuration, ~duration);
6161 addInteger (linkType, ~type);
6262
63- [dictionary addEntriesFromDictionary: self .controlParams];
63+ // [dictionary addEntriesFromDictionary:self.controlParams];
6464
6565 return dictionary;
6666}
Original file line number Diff line number Diff line change @@ -700,7 +700,13 @@ - (void) branchShortLinkWithContent:(BranchUniversalObject*)content
700700
701701 NSMutableDictionary *dictionary = [NSMutableDictionary new ];
702702 [dictionary addEntriesFromDictionary: linkProperties.dictionary];
703- dictionary[@" data" ] = content.dictionary ;
703+
704+ // Control params must also be at the data level
705+ NSMutableDictionary *data = [NSMutableDictionary new ];
706+ [data addEntriesFromDictionary: linkProperties.controlParams];
707+ [data addEntriesFromDictionary: content.dictionary];
708+ dictionary[@" data" ] = data;
709+
704710 [self .networkAPIService appendV1APIParametersWithDictionary: dictionary];
705711 [self .networkAPIService postOperationForAPIServiceName: @" v1/url"
706712 dictionary: dictionary
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ - (BranchUniversalObject*) createUniversalObject {
264264- (BranchLinkProperties*) createLinkProperties {
265265 NSString *feature = @" Sharing Feature" ;
266266 NSString *channel = @" Distribution Channel" ;
267- // NSString *desktop_url = @"http://branch.io";
267+ NSString *desktop_url = @" http://branch.io" ;
268268// NSString *ios_url = @"https://dev.branch.io/getting-started/sdk-integration-guide/guide/ios/";
269269
270270 BranchLinkProperties *linkProperties = [[BranchLinkProperties alloc ] init ];
@@ -274,6 +274,9 @@ - (BranchLinkProperties*) createLinkProperties {
274274 linkProperties.stage = @" stage four" ;
275275 linkProperties.campaign = @" some campaign" ;
276276 linkProperties.matchDuration = 18000 ;
277+
278+ linkProperties.controlParams [@" $desktop_url" ] = desktop_url;
279+
277280 // TODO: Control params:
278281// [linkProperties addControlParam:@"$desktop_url" withValue: desktop_url];
279282// [linkProperties addControlParam:@"$ios_url" withValue: ios_url];
You can’t perform that action at this time.
0 commit comments