@@ -86,8 +86,10 @@ @interface Branch() <UIGestureRecognizerDelegate, BranchDeepLinkingControllerCom
8686@property (strong , nonatomic ) NSMutableDictionary *deepLinkControllers;
8787@property (weak , nonatomic ) UIViewController *deepLinkPresentingController;
8888@property (assign , nonatomic ) BOOL useCookieBasedMatching;
89+ @property (strong , nonatomic ) NSDictionary *deepLinkDebugParams;
8990@property (assign , nonatomic ) BOOL accountForFacebookSDK;
9091
92+
9193@end
9294
9395@implementation Branch
@@ -383,6 +385,14 @@ - (void)initSessionWithLaunchOptions:(NSDictionary *)options isReferrable:(BOOL)
383385 }
384386}
385387
388+
389+
390+ // these params will be added
391+ - (void ) setDeepLinkDebugMode : (NSDictionary *)debugParams {
392+ self.deepLinkDebugParams = debugParams;
393+ }
394+
395+
386396- (BOOL )handleDeepLink : (NSURL *)url {
387397 BOOL handled = NO ;
388398 if (url) {
@@ -410,7 +420,6 @@ - (BOOL)continueUserActivity:(NSUserActivity *)userActivity {
410420 // check to see if a browser activity needs to be handled
411421 if ([userActivity.activityType isEqualToString: NSUserActivityTypeBrowsingWeb ]) {
412422 self.preferenceHelper .universalLinkUrl = [userActivity.webpageURL absoluteString ];
413-
414423 [self initUserSessionAndCallCallback: YES ];
415424 self.preferenceHelper .isContinuingUserActivity = NO ;
416425
@@ -668,11 +677,25 @@ - (BranchLinkProperties *)getFirstReferringBranchLinkProperties {
668677}
669678
670679- (NSDictionary *)getFirstReferringParams {
671- return [BNCEncodingUtils decodeJsonStringToDictionary: self .preferenceHelper.installParams];
680+ NSDictionary *origInstallParams = [BNCEncodingUtils decodeJsonStringToDictionary: self .preferenceHelper.installParams];
681+
682+ if (self.deepLinkDebugParams ) {
683+ NSMutableDictionary * debugInstallParams = [[BNCEncodingUtils decodeJsonStringToDictionary: self .preferenceHelper.sessionParams] mutableCopy ];
684+ [debugInstallParams addEntriesFromDictionary: self .deepLinkDebugParams];
685+ return debugInstallParams;
686+ }
687+ return origInstallParams;
672688}
673689
674690- (NSDictionary *)getLatestReferringParams {
675- return [BNCEncodingUtils decodeJsonStringToDictionary: self .preferenceHelper.sessionParams];
691+ NSDictionary *origSessionParams = [BNCEncodingUtils decodeJsonStringToDictionary: self .preferenceHelper.sessionParams];
692+
693+ if (self.deepLinkDebugParams ) {
694+ NSMutableDictionary * debugSessionParams = [origSessionParams mutableCopy ];
695+ [debugSessionParams addEntriesFromDictionary: self .deepLinkDebugParams];
696+ return debugSessionParams;
697+ }
698+ return origSessionParams;
676699}
677700
678701- (BranchUniversalObject *)getLatestReferringBranchUniversalObject {
0 commit comments