Super basic SwiftUI with paywall using RevenueCat
June 23, 2022 ยท View on GitHub
I wanted to show how to make a SwiftUI app that can easily get updated customer info (when purchases are made) to update the user interface to show the newly unlockd content.
- Listens for
CustomerInfoupdates usingPurchases.shared.customerInfoStream(anAsyncSequence) - Updates a
@StateObjectthat is passed as an environment object to children views ContentViewwill...- Display paywall from current
Offeringif no active entitlements - Show a
Text(unlocked content) if active entitlements - Will update automatically when the customer info environment object is updated
- Display paywall from current
Demo
โ ๏ธ This demo is using an account that is used for lots of sandbox testing so the two "lifetime" packages isn't a bug ๐ Just something I need to clean up ๐คทโโ๏ธ
https://user-images.githubusercontent.com/401294/175346246-3b975d5f-c18e-40be-98d6-3570d0ff817a.mp4