Hey @Sumon Ahmed!
Not caching Offerings between app launches is intentional, as you don’t want to display out-of-date pricing information to customers. Also, a network connection is required to complete a purchase through Apple so you can warn the customer of this at when or before you attempt to present your paywall.
Hey Ryan, thanks for your answer.
“as you don’t want to display out-of-date pricing information to customers.”
I am thinking about what should I show in the paywall screen .
I am working with some kids' app and nowadays, so many parents want their kids will use their iPhones/iPad offline. Tapping a locked item and showing the paywall screen with pricing is important to convince the parents to upgrade to premium even with old price. Network connection is checked after successful parental access. I have to manually cache the last offerings data, otherwise I need to show the paywall screen without pricing which is not a good idea i think.
“Not caching Offerings between app launches is intentional.”
For my scenario, caching Offerings between app launches would be a great help.
Hey @Sumon Ahmed you could save the Offerings in UserDefaults and update it each time the `getOfferings` call completes. You’d probably also want to save a timestamp or something so you could throw out the cache and just wait for the network if it’s too stale.