iOS Swift SDK clearSession() not calling completion block sometimes.

I am calling


to clear saved credential from browser. It seems this method launches SafariViewController in the back. If you look really closely, you can see a transparent view presenting when you call this method. One problem is that you can actually dismiss this view by keep tapping on the left top of the window. (There is “Done” button in that section SafariViewController)

And another problem which is more serious for us, is that clearSession() will not call completion block in this case. So, app cannot know when this session clearing has actually ended, regardless of success/fail.

Does anybody know a workaround for this? I am thinking I should probably cover the entire screen while clearSession() is going on, so that user cannot tap the (hidden) “Done” button and dismiss SafariViewController.