Răsfoiți Sursa

Check for Pending Dynamic link guard check logic change (#5993)

Check for pending DL guard check logic change.
Eldhose M Babu 5 ani în urmă
părinte
comite
d5d795c118

+ 3 - 0
FirebaseDynamicLinks/CHANGELOG.md

@@ -1,3 +1,6 @@
+# v4.2.1
+- [fixed]Check for Pending Dynamic link guard check logic
+
 # v4.2.0
 - [fixed] Fixed crashes that occur when a dynamic link is opened for the second time while an app is in the foreground (#5880)
 - [Added] Plist property `FirebaseDeepLinkPasteboardRetrievalEnabled` to enable/disable fetching dynamic links from Pasteboard.

+ 5 - 1
FirebaseDynamicLinks/Sources/FIRDynamicLinks.m

@@ -307,7 +307,11 @@ static const NSInteger FIRErrorCodeDurableDeepLinkFailed = -119;
 
 - (void)checkForPendingDynamicLink {
   // Make sure this method is called only once after the application was installed.
-  BOOL appInviteDeepLinkRead = [_userDefaults boolForKey:kFIRDLReadDeepLinkAfterInstallKey];
+  // kFIRDLOpenURLKey marks checkForPendingDynamic link had been called already so no need to do it
+  // again. kFIRDLReadDeepLinkAfterInstallKey marks we have already read a deeplink after the
+  // install and so no need to do check for pending dynamic link.
+  BOOL appInviteDeepLinkRead = [_userDefaults boolForKey:kFIRDLOpenURLKey] ||
+                               [_userDefaults boolForKey:kFIRDLReadDeepLinkAfterInstallKey];
 
   if (appInviteDeepLinkRead || self.retrievingPendingDynamicLink) {
     NSString *errorDescription =