Skip to content

Commit 4368b98

Browse files
Fixed broken callback to AppDelegate (#6800) (#6801)
Fixed broken callback to AppDelegate after retrieving a dynamic link during fresh app start. The AppDelegate call was broken in PR : #6517 Reverting to the old implementation of dynamic link passing to App delegate with changes to remove iOS 9 checks. Using new "openURL" method instead of the deprecated one. Clean up in the sample app pod file. Co-authored-by: Eldhose M Babu <[email protected]>
1 parent 0be893d commit 4368b98

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

FirebaseDynamicLinks/Sources/FIRDynamicLinks.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,15 @@ - (BOOL)handleIncomingCustomSchemeDeepLink:(NSURL *)url {
509509
}
510510

511511
- (void)passRetrievedDynamicLinkToApplication:(NSURL *)url {
512+
id<UIApplicationDelegate> applicationDelegate = [UIApplication sharedApplication].delegate;
513+
if (applicationDelegate &&
514+
[applicationDelegate respondsToSelector:@selector(application:openURL:options:)]) {
515+
// pass url directly to application delegate to avoid hop into
516+
// iOS handling of the universal links
517+
[applicationDelegate application:[UIApplication sharedApplication] openURL:url options:@{}];
518+
return;
519+
}
520+
512521
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
513522
}
514523

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
# Uncomment the next line to define a global platform for your project
2-
# platform :ios, '9.0'
3-
41
target 'FDLBuilderTestAppObjC' do
5-
# Comment the next line if you don't want to use dynamic frameworks
2+
platform :ios, '10.0'
63
use_frameworks!
7-
pod 'FirebaseAnalytics'
4+
85
pod 'FirebaseCore', :path => '../../../'
9-
pod 'FirebaseInstallations', :path => '../../../'
10-
pod 'FirebaseInstanceID', :path => '../../../'
11-
pod 'FirebaseDynamicLinks', :path => '../../../'
6+
pod 'FirebaseCoreDiagnostics', :path => '../../../'
7+
pod 'GoogleDataTransport', :path => '../../../'
128
pod 'GoogleUtilities', :path => '../../../'
13-
9+
pod 'FirebaseDynamicLinks', :path => '../../../'
1410
end

0 commit comments

Comments
 (0)