Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed broken callback to AppDelegate #6800

Merged
merged 2 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions FirebaseDynamicLinks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v4.3.2
- [fixed] Fixed broken callback to AppDelegate after retrieveing a dynamic link during fresh app start.

# v4.3.1
- [changed] Client id usage in api call and respective checks in the code.
- [fixed] Fix attempts to connect to invalid ipv6 domain by updating ipv4 and ipv6 to use a single, valid endpoint (#5032)
Expand Down
15 changes: 14 additions & 1 deletion FirebaseDynamicLinks/Sources/FIRDynamicLinks.m
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,20 @@ - (BOOL)handleIncomingCustomSchemeDeepLink:(NSURL *)url {
}

- (void)passRetrievedDynamicLinkToApplication:(NSURL *)url {
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
id<UIApplicationDelegate> applicationDelegate = [UIApplication sharedApplication].delegate;
if (applicationDelegate &&
[applicationDelegate respondsToSelector:@selector(application:openURL:options:)]) {
// pass url directly to application delegate to avoid hop into
// iOS handling of the universal links
if (@available(iOS 9.0, *)) {
[applicationDelegate application:[UIApplication sharedApplication] openURL:url options:@{}];
return;
}
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[[UIApplication sharedApplication] openURL:url];
#pragma clang diagnostic pop
}

- (void)handlePendingDynamicLinkRetrievalFailureWithErrorCode:(NSInteger)errorCode
Expand Down
14 changes: 5 additions & 9 deletions FirebaseDynamicLinks/Tests/Sample/Podfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'FDLBuilderTestAppObjC' do
# Comment the next line if you don't want to use dynamic frameworks
platform :ios, '10.0'
use_frameworks!
pod 'FirebaseAnalytics'

pod 'FirebaseCore', :path => '../../../'
pod 'FirebaseInstallations', :path => '../../../'
pod 'FirebaseInstanceID', :path => '../../../'
pod 'FirebaseDynamicLinks', :path => '../../../'
pod 'FirebaseCoreDiagnostics', :path => '../../../'
pod 'GoogleDataTransport', :path => '../../../'
pod 'GoogleUtilities', :path => '../../../'

pod 'FirebaseDynamicLinks', :path => '../../../'
end