Removing the cancel button in ASWebAuthenticationSession WebView

496 Views Asked by At

I am using a ASWebAuthenticationSession and want to remove the cancel nav bar button so the user cant close the window (mandatory verification needed to use the app)

I cant find a way to achieve this because the ASWebAuthenticationSession webview is hidden from us so we cant customise it.

Is there some way to swizzle to remove the left bar button item? my knowledge here is thin, but i cant see any other way of hiding a bar button item on a view we cant access

Thanks for any help or advice here

enter image description here

1

There are 1 best solutions below

0
On

You cannot hide Cancel button because the screen is defined by Apple framework. Moreover, it's shown by another process so you cannot go through the UI to make it hidden by your own.