SFSafariViewController loses state when returning to application

My application has an online online payment stream - through the Adyen Hosting Payment (HPP) Payment Page - at SFSafariViewController(as recommended by Adyen). When the flow of payments happens completely inside Safari, it works very well.

But some banks use their native iOS app to authorize a web payment (usually by entering a PIN there after entering one user ID into the web stream). When you return to my application, the Safari view controller often reloads its contents, discarding the entire payment flow until payment is completed. (The same thing often happens with a simple visit to any other application - I think this has something to do with memory consumption?)

Is there a way to force the Safari view controller to maintain its current state no matter what?

+4
source share
2 answers

I find the same behavior in my application. In our case, we do not use Adyen. But the behavior is the same.

Each time the application returns to the forefront after some time, it loses its status and restarts to its original state.

I have not found a way to avoid this behavior. Is there a way to get SFSafariViewController to keep its state?

UPDATE: I found that this behavior only happens in iOS 10.0.1

+1
source

SFSafariViewController, SDK Search Lookup Adyen: https://github.com/Adyen/adyen-dl-ios , HPP ( ) .

+2

Source: https://habr.com/ru/post/1660766/


All Articles