schibsted / account-sdk-ios

⛔️ DEPRECATED SchibstedAccount SDK for iOS
MIT License
6 stars 16 forks source link

modal presentation style of identity ui when compiled with iOS 13.x sdk #280

Closed robertmusialek closed 4 years ago

robertmusialek commented 5 years ago

according to the documentation modalPresentationStyle behaviour changed:

Defaults to UIModalPresentationAutomatic on iOS starting in iOS 13.0, and UIModalPresentationFullScreen on previous versions. By default UIViewController resolves UIModalPresentationAutomatic to UIModalPresentationPageSheet, but other system-provided view controllers may resolve UIModalPresentationAutomatic to other concrete presentation styles.

because of this change when compiled with xcode 11 and iOS 13, IdentityUI is presented in a way that it makes it possible to dismiss by swiping down, even if isCancelable is set to false

IMG_0D5A3D4ABE4F-1 IMG_CE13BA07BC23-1

possible fixes include changing presentation style to .fullScreen or disabling swipe gesture when presented modally by setting isModalInPresentation to true it might be good idea to tie this to isCancelable parameter of IdentityUI?

those changes also have implications on close/save/dismiss type of buttons on modal presentation of view controllers, here's great article that explains everything: https://medium.com/@hacknicity/view-controller-presentation-changes-in-ios-13-ac8c901ebc4e

zamzterz commented 5 years ago

Thanks for the detailed report and references! 🙇

I think it's better to just disable swipe gesture if the flow isn't cancellable; there's no need for our login flow to be full screen. 🙂