Skip to main content
Solved

Allow variable access in Swift SDK

  • 9 February 2024
  • 2 replies
  • 62 views

Forum|alt.badge.img+3

Hi,

 

I’m working on creating a native paywall with SwiftUI because we have a paywall design that deviates from the templates. (it’s mainly sizes and margin - footer paywalls are too tall for our use. Hope this is configurable in the future)

 

While creating a custom paywall, I wish we could still use some of the variables and localization RC offers with paywall templates. e.g., I tried to access periodName (e.g. “Annual”) via

 

package.periodNameOrIdentifier(.current)

This gives “'periodNameOrIdentifier' is inaccessible due to 'internal' protection level"

 

It seems that making ‘extension Package: VariableDataProvider’  public might allow this. Can RC support this? 

 

At a high level, the pain here is that as soon as we try to do anything custom that deviates from the template, we face reimplementing many of the conveniences RC provides. Wish there was a middle ground somehow.

Best answer by Michael Fogel

Hey @daniel-888f34 !

 

While this is not available as of now, I will go ahead and share this with the team as a feature request so we can hopefully implement something along the lines of this in the future!

 

In the meantime, I recommend creating a custom paywall and using our normal fetching/purchasing methods to get information of your products and trigger purchases.

View original
Did this post help you find an answer to your question?

2 replies

Michael Fogel
Forum|alt.badge.img+6
  • Dedicated Contributor
  • 382 replies
  • Answer
  • February 13, 2024

Hey @daniel-888f34 !

 

While this is not available as of now, I will go ahead and share this with the team as a feature request so we can hopefully implement something along the lines of this in the future!

 

In the meantime, I recommend creating a custom paywall and using our normal fetching/purchasing methods to get information of your products and trigger purchases.


Forum|alt.badge.img+3
  • Author
  • New Member
  • 3 replies
  • February 13, 2024

Hey Michael,

 

Thanks for looking into this!


Did this post help you find an answer to your question?

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings