Merge pull request #665 from invertase/revert-664-master

Revert "iOS Dynamic Links now 'Survive' installation."
This commit is contained in:
Michael Diarmid 2017-12-04 23:08:20 +00:00 committed by GitHub
commit bb1a06575d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -16,8 +16,6 @@ static void sendDynamicLink(NSURL *url, id sender) {
RCT_EXPORT_MODULE(); RCT_EXPORT_MODULE();
static NSURL *installLink;
- (id)init { - (id)init {
self = [super init]; self = [super init];
if (self != nil) { if (self != nil) {
@ -53,9 +51,6 @@ static NSURL *installLink;
} }
+ (BOOL)handleLinkFromCustomSchemeURL:(NSURL *)url { + (BOOL)handleLinkFromCustomSchemeURL:(NSURL *)url {
if(!installLink) {
installLink = url;
}
FIRDynamicLink *dynamicLink = FIRDynamicLink *dynamicLink =
[[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url]; [[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url];
if (dynamicLink && dynamicLink.url) { if (dynamicLink && dynamicLink.url) {
@ -129,8 +124,7 @@ RCT_EXPORT_METHOD(getInitialLink:(RCTPromiseResolveBlock)resolve rejecter:(RCTPr
if (self.bridge.launchOptions[UIApplicationLaunchOptionsURLKey]) { if (self.bridge.launchOptions[UIApplicationLaunchOptionsURLKey]) {
NSURL* url = (NSURL*)self.bridge.launchOptions[UIApplicationLaunchOptionsURLKey]; NSURL* url = (NSURL*)self.bridge.launchOptions[UIApplicationLaunchOptionsURLKey];
[self handleInitialLinkFromCustomSchemeURL:url resolver:resolve rejecter:reject]; [self handleInitialLinkFromCustomSchemeURL:url resolver:resolve rejecter:reject];
} else if(installLink) {
[self handleInitialLinkFromCustomSchemeURL:installLink resolver:resolve rejecter:reject];
} else { } else {
NSDictionary *userActivityDictionary = NSDictionary *userActivityDictionary =
self.bridge.launchOptions[UIApplicationLaunchOptionsUserActivityDictionaryKey]; self.bridge.launchOptions[UIApplicationLaunchOptionsUserActivityDictionaryKey];