Releases: FlineDev/FreemiumKit
Releases · FlineDev/FreemiumKit
1.13.1
1.13.0
- Deprecates
FreemiumKit.preview
in favor ofFreemiumKit.shared
for SwiftUI Previews - Adds support for seeing your actual paywall in SwiftUI Previews, but 3 steps are needed:
- Press the 'Save Changes to Remote' button in the latest version of FreemiumKit (requires
1.2.2
or later) - Drag & drop your config file from the 'Setup' tab to your
Preview Assets.xcassets
(besidesAssets.xcassets
) - Rename dragged asset from 'FreemiumKit' to 'FreemiumKitPreview' to avoid duplicate asset warnings (1.13.1+)
- Press the 'Save Changes to Remote' button in the latest version of FreemiumKit (requires
1.12.1
1.12.0
-
Added
freeIf
parameter toPaidFeatureButton
&PaidFeatureView
for freemium features with usage limitsExample usage with
PaidFeatureButton
:// Let users export 3 PDFs for free, then require subscription // - Shows normal button while free exports remain // - Shows locked button & paywall after limit reached PaidFeatureButton( "Export PDF", systemImage: "doc.pdf", freeIf: { remainingFreeExports > 0 } ) { exportPDF() remainingFreeExports -= 1 }
Example usage with
PaidFeatureView
:PaidFeatureView(freeIf: { usedPremiumContents.count < freeUsageLimit }) { Text("Premium Content") // Shown when subscribed or free condition is met } lockedView: { Label("Get Premium Content", systemImage: "lock") // Shown when locked }
1.11.0
- Adds support for dynamically controlling which tiers should be shown in the paywall by providing a
showTierInPaywall
closure. Learn More