Don't pass universalLinksOnly option to openURL on mac catalyst (#144)

This commit is contained in:
Yuki 2021-03-04 11:20:04 -08:00 committed by GitHub
parent fd9d0ed9f3
commit c8c0a0a583
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1183,9 +1183,11 @@ public class STPPaymentHandler: NSObject, SFSafariViewControllerDelegate, STPURL
// Redirect to an app
// We don't want universal links to open up Safari, but we do want to allow custom URL schemes
var options: [UIApplication.OpenExternalURLOptionsKey: Any] = [:]
#if !targetEnvironment(macCatalyst)
if let scheme = url?.scheme, scheme == "http" || scheme == "https" {
options[UIApplication.OpenExternalURLOptionsKey.universalLinksOnly] = true
}
#endif
// We don't check canOpenURL before opening the URL because that requires users to pre-register the custom URL schemes
if let url = url {