mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
SSOAuthenticationPresenterError: Use SFSafariViewController below iOS 13.0 instead of SFAuthenticationSession atm due to an app name Apple issue.
This commit is contained in:
parent
80738d25a3
commit
aea91a9b68
1 changed files with 10 additions and 4 deletions
|
@ -68,11 +68,17 @@ final class SSOAuthenticationPresenter: NSObject {
|
|||
|
||||
self.presentingViewController = presentingViewController
|
||||
|
||||
// SFAuthenticationSession and ASWebAuthenticationSession doesn't work with guided access (rdar://48376122)
|
||||
if UIAccessibility.isGuidedAccessEnabled {
|
||||
self.presentSafariViewController(with: authenticationURL, animated: animated)
|
||||
// NOTE: By using SFAuthenticationSession the consent alert show product name instead of display name. Fallback to SFSafariViewController instead in order to not disturb users with "Riot" wording at the moment.
|
||||
// (https://stackoverflow.com/questions/49860338/why-does-sfauthenticationsession-consent-alert-show-xcode-project-name-instead-o)
|
||||
if #available(iOS 13.0, *) {
|
||||
// SFAuthenticationSession and ASWebAuthenticationSession doesn't work with guided access (rdar://48376122)
|
||||
if UIAccessibility.isGuidedAccessEnabled {
|
||||
self.presentSafariViewController(with: authenticationURL, animated: animated)
|
||||
} else {
|
||||
self.startAuthenticationSession(with: authenticationURL)
|
||||
}
|
||||
} else {
|
||||
self.startAuthenticationSession(with: authenticationURL)
|
||||
self.presentSafariViewController(with: authenticationURL, animated: animated)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue