@@ -82,7 +82,7 @@ - (BOOL)isTrackingDisabled {
8282 return Branch.trackingDisabled ;
8383}
8484
85- - (NSDictionary *)dataForInstallWithRequestObject : (BranchInstallRequest *) installRequest {
85+ - (NSDictionary *)dataForInstallWithLinkParams : (BranchOpenRequestLinkParams *) linkParams {
8686 NSMutableDictionary *json = [NSMutableDictionary new ];
8787
8888 // All requests
@@ -101,18 +101,18 @@ - (NSDictionary *)dataForInstallWithRequestObject:(BranchInstallRequest *) insta
101101 // Install and Open
102102 [self addDeveloperUserIDToJSON: json];
103103 [self addSystemObserverDataToJSON: json];
104- [self addOpenRequestDataToJSON: json fromRequestObject: installRequest ];
104+ [self addOpenRequestDataToJSON: json fromLinkParams: linkParams ];
105105 [self addPartnerParametersToJSON: json];
106106 [self addAppleReceiptSourceToJSON: json];
107107 [self addTimestampsToJSON: json];
108108
109109 // Check if the urlString is a valid URL to ensure it's a universal link, not the external intent uri
110- if (installRequest. urlString && !installRequest. linkParams .dropURLOpen ) {
111- NSURL *url = [NSURL URLWithString: installRequest.urlString ];
110+ if (linkParams. referringURL && !linkParams.dropURLOpen ) {
111+ NSURL *url = [NSURL URLWithString: linkParams.referringURL ];
112112 if (url && ([url.scheme isEqualToString: @" http" ] || [url.scheme isEqualToString: @" https" ])) {
113- [self safeSetValue: installRequest.urlString forKey: BRANCH_REQUEST_KEY_UNIVERSAL_LINK_URL onDict: json];
113+ [self safeSetValue: linkParams.referringURL forKey: BRANCH_REQUEST_KEY_UNIVERSAL_LINK_URL onDict: json];
114114 } else {
115- [self safeSetValue: installRequest.urlString forKey: BRANCH_REQUEST_KEY_EXTERNAL_INTENT_URI onDict: json];
115+ [self safeSetValue: linkParams.referringURL forKey: BRANCH_REQUEST_KEY_EXTERNAL_INTENT_URI onDict: json];
116116 }
117117 }
118118
@@ -134,7 +134,7 @@ - (NSDictionary *)dataForInstallWithRequestObject:(BranchInstallRequest *) insta
134134 return json;
135135}
136136
137- - (NSDictionary *)dataForOpenWithRequestObject : (BranchOpenRequest *) openRequest {
137+ - (NSDictionary *)dataForOpenWithLinkParams : (BranchOpenRequestLinkParams *) linkParams {
138138 NSMutableDictionary *json = [NSMutableDictionary new ];
139139
140140 // All requests
@@ -156,19 +156,19 @@ - (NSDictionary *)dataForOpenWithRequestObject:(BranchOpenRequest *) openRequest
156156 // Install and Open
157157 [self addDeveloperUserIDToJSON: json];
158158 [self addSystemObserverDataToJSON: json];
159- [self addOpenRequestDataToJSON: json fromRequestObject: openRequest ];
159+ [self addOpenRequestDataToJSON: json fromLinkParams: linkParams ];
160160 [self addPartnerParametersToJSON: json];
161161 [self addAppleReceiptSourceToJSON: json];
162162 [self addTimestampsToJSON: json];
163163
164164
165165 // Check if the urlString is a valid URL to ensure it's a universal link, not the external intent uri
166- if (openRequest. urlString && !openRequest. linkParams .dropURLOpen ) {
167- NSURL *url = [NSURL URLWithString: openRequest.urlString ];
166+ if (linkParams. referringURL && !linkParams.dropURLOpen ) {
167+ NSURL *url = [NSURL URLWithString: linkParams.referringURL ];
168168 if (url && ([url.scheme isEqualToString: @" http" ] || [url.scheme isEqualToString: @" https" ])) {
169- [self safeSetValue: openRequest.urlString forKey: BRANCH_REQUEST_KEY_UNIVERSAL_LINK_URL onDict: json];
169+ [self safeSetValue: linkParams.referringURL forKey: BRANCH_REQUEST_KEY_UNIVERSAL_LINK_URL onDict: json];
170170 } else {
171- [self safeSetValue: openRequest.urlString forKey: BRANCH_REQUEST_KEY_EXTERNAL_INTENT_URI onDict: json];
171+ [self safeSetValue: linkParams.referringURL forKey: BRANCH_REQUEST_KEY_EXTERNAL_INTENT_URI onDict: json];
172172 }
173173 }
174174
@@ -305,12 +305,12 @@ - (void)addShortURLTokensToJSON:(NSMutableDictionary *)json isSpotlightRequest:(
305305 json[BRANCH_REQUEST_KEY_SESSION_ID] = self.preferenceHelper .sessionID ;
306306}
307307
308- - (void )addOpenRequestDataToJSON : (NSMutableDictionary *)json fromRequestObject : (BranchOpenRequest *) openRequest {
308+ - (void )addOpenRequestDataToJSON : (NSMutableDictionary *)json fromLinkParams : (BranchOpenRequestLinkParams *) linkParams {
309309 json[BRANCH_REQUEST_KEY_DEBUG] = @(self.preferenceHelper .isDebug );
310310 [self safeSetValue: self .preferenceHelper.initialReferrer forKey: BRANCH_REQUEST_KEY_INITIAL_REFERRER onDict: json];
311311
312- [self safeSetValue: openRequest. linkParams.linkClickIdentifier forKey: BRANCH_REQUEST_KEY_LINK_IDENTIFIER onDict: json];
313- [self safeSetValue: openRequest. linkParams.spotlightIdentifier forKey: BRANCH_REQUEST_KEY_SPOTLIGHT_IDENTIFIER onDict: json];
312+ [self safeSetValue: linkParams.linkClickIdentifier forKey: BRANCH_REQUEST_KEY_LINK_IDENTIFIER onDict: json];
313+ [self safeSetValue: linkParams.spotlightIdentifier forKey: BRANCH_REQUEST_KEY_SPOTLIGHT_IDENTIFIER onDict: json];
314314
315315}
316316
0 commit comments