You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're currently integrating with Superwall, and have come up with a possible improvement in the SDK. We've looked around in the SDK and documentation and haven't found a straightforward way to achieve what we are suggesting, but of course we might have missed an obvious solution to this problem. In that case, feel free to close this issue.
Is your feature request related to a problem? Please describe.
We're implementing a paywall with some custom actions that leads to navigation within the app. In some cases, these custom actions will lead to something being pushed on the navigation stack of the paywall view controller. To avoid bookkeeping of what paywall view controller is being presented, it would be nice to receive this information from the SDK.
Describe the solution you'd like
I'm thinking that the delegate method handleCustomPaywallAction of SuperwallDelegate could be augmented with another argument: in paywallViewController: PaywallViewController.
Before:
extensionSuperwallManager:SuperwallDelegate{func handleCustomPaywallAction(withName name:String){switch action {case"feedback":
// How do I push something on to the navigation stack from here?
breakdefault:break}}}
After:
extensionSuperwallManager:SuperwallDelegate{func handleCustomPaywallAction(
withName name:String,
in paywallViewController:PaywallViewController){switch action {case"feedback":
paywalViewController.navigationController?.pushViewController(..., animated:true)default:break}}}
Describe alternatives you've considered
It is possible to do some bookkeeping to keep track of the current paywall being presented, and push on the navigation stack. It's just more work.
Another alternative could be to move this delegate method to the PaywallViewControllerDelegate.
The text was updated successfully, but these errors were encountered:
Are you using getPaywall to get the paywall and push it onto the stack? Or you're using register but you want to access a navigation controller that the paywall is part of? You can always get the presented paywall by calling Superwall.shared.paywallViewController.
We are indeed using getPaywall to manually display the paywall. Sometimes the paywall is pushed onto an existing navigation stack, and other times, it is presented as the first view controller in a new navigation stack.
Oh, I don't think we were aware of Superwall.shared.paywallViewController. That might be what we were looking for. I'll take a look at that.
We're currently integrating with Superwall, and have come up with a possible improvement in the SDK. We've looked around in the SDK and documentation and haven't found a straightforward way to achieve what we are suggesting, but of course we might have missed an obvious solution to this problem. In that case, feel free to close this issue.
Is your feature request related to a problem? Please describe.
We're implementing a paywall with some custom actions that leads to navigation within the app. In some cases, these custom actions will lead to something being pushed on the navigation stack of the paywall view controller. To avoid bookkeeping of what paywall view controller is being presented, it would be nice to receive this information from the SDK.
Describe the solution you'd like
I'm thinking that the delegate method
handleCustomPaywallAction
ofSuperwallDelegate
could be augmented with another argument:in paywallViewController: PaywallViewController
.Before:
After:
Describe alternatives you've considered
It is possible to do some bookkeeping to keep track of the current paywall being presented, and push on the navigation stack. It's just more work.
Another alternative could be to move this delegate method to the
PaywallViewControllerDelegate
.The text was updated successfully, but these errors were encountered: