From c9a8b4e1b1f252066c0a7f98f8e8b89477cee008 Mon Sep 17 00:00:00 2001 From: Michael Diarmid Date: Mon, 4 Dec 2017 22:54:45 +0000 Subject: [PATCH] Revert "iOS Dynamic Links now 'Survive' installation." --- ios/RNFirebase/links/RNFirebaseLinks.m | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ios/RNFirebase/links/RNFirebaseLinks.m b/ios/RNFirebase/links/RNFirebaseLinks.m index f7f580d4..350eb25b 100644 --- a/ios/RNFirebase/links/RNFirebaseLinks.m +++ b/ios/RNFirebase/links/RNFirebaseLinks.m @@ -16,8 +16,6 @@ static void sendDynamicLink(NSURL *url, id sender) { RCT_EXPORT_MODULE(); -static NSURL *installLink; - - (id)init { self = [super init]; if (self != nil) { @@ -53,9 +51,6 @@ static NSURL *installLink; } + (BOOL)handleLinkFromCustomSchemeURL:(NSURL *)url { - if(!installLink) { - installLink = url; - } FIRDynamicLink *dynamicLink = [[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url]; if (dynamicLink && dynamicLink.url) { @@ -129,8 +124,7 @@ RCT_EXPORT_METHOD(getInitialLink:(RCTPromiseResolveBlock)resolve rejecter:(RCTPr if (self.bridge.launchOptions[UIApplicationLaunchOptionsURLKey]) { NSURL* url = (NSURL*)self.bridge.launchOptions[UIApplicationLaunchOptionsURLKey]; [self handleInitialLinkFromCustomSchemeURL:url resolver:resolve rejecter:reject]; - } else if(installLink) { - [self handleInitialLinkFromCustomSchemeURL:installLink resolver:resolve rejecter:reject]; + } else { NSDictionary *userActivityDictionary = self.bridge.launchOptions[UIApplicationLaunchOptionsUserActivityDictionaryKey];