I am implementing paypal using SFSafariViewController. I have called the create order api and after the order is success i return back to my app to capture payment by using a deep link in openURLContexts method of scene delegate.
I want to return just where i was on a View Controller called GetPlansVC. Right now if i simply navigate to GetPlansVC the app screen turns black.
And if i create a new instance of navigation controller my previous data like access token is lost.
I tried calling notification on receiving token but that turned my app screen black.
You can create an object in your scene delegate (or in other place, it can be singleton for example), which contain closure. In your
GetPlansVC
you place a closure, where you close SFSafariViewController, and in scene delegate, on receive deep link, you invoke this closure. It's a basic concept, you can place it in your architecture in a better way, that I've writtenExample: