iOS 13 View Controller present style options
Since iOS 13, the default presentation style of presenting a View Controller, a.k.a. modalPresentationStyle is UIModalPresentationAutomatic, in which will result in a non-fullscreen modal.
https://developer.apple.com/documentation/uikit/uimodalpresentationstyle/automatic
But in current procedure, developer can't get access to the SFSAFARIViewcontroller instance which is used to let user sign-in. It is better to give developer access to the modalPresentationStyle, to decide how the sign-inpop-up looks like.
This would be great to set. Especially since it would appear that events like viewWillAppear will fire if the style is .fullscreen but not for the default
Any update/movement on this? Kind of a dealbreaker for us as we need this view in .fullscreen. Would really appreciate any workarounds or updates on supporting this ask.
Same here, we can't let the user cancel login for a product that requires it, and it's a janky user experience to simply re-present the login view controller after they cancel/dismiss it.
On iOS 13, the default user agent (OIDExternalUserAgentIOS) of AppAuth uses ASWebAuthenticationSession to present the authorization to the user. ASWebAuthenticationSession is the one who creates and present the view controller, so AppAuth doesn't have access to this view controller.
Knowing that, I don't think changing the modal presentation style of this view controller is something in our control.
Same here, we can't let the user cancel login for a product that requires it, and it's a janky user experience to simply re-present the login view controller after they cancel/dismiss it.
@rwalbergpd I don't get it. Why presenting the view controller with .fullscreen would prevent the user from cancelling/dismissing the authorization VC? The cancel button remains in the navigation bar.
@rwalbergpd I don't get it. Why presenting the view controller with .fullscreen would prevent the user from cancelling/dismissing the authorization VC? The cancel button remains in the navigation bar.
It would prevent the user from swiping down to dismiss it. The cancel button would still be there, which we can find and remove.
@mikeberlin the only way is to use the SFSafariViewController. If you do a fork you can comment the code for iOS 11 and 12 so the SFSafariVC available since iOS 9 will be used which allows to change the presentation style.
I have followed below post and able to show full screen login screen on iOS 13+, https://msolarana.netlify.app/2021/01/06/fixing-aswebauthenticationsession-presentation/