Don't pass universalLinksOnly option to openURL on mac catalyst (#144)
This commit is contained in:
parent
fd9d0ed9f3
commit
c8c0a0a583
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue