Skip to content

Commit

Permalink
Further clarify how to override for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed Aug 15, 2024
1 parent 92ca1f3 commit bef9b0f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Sources/FreemiumKit/FreemiumKit.docc/SetupGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,19 @@ Learn how to set up your app for our paywalls and live push notifications.
}
```

> Tip: If you want to disable the paywall during DEBUG builds after you've made sure that it works as expected, you can call `.withOverridesForDebug(purchasedTier: 1)` on `FreemiumKit.shared` within an `#if DEBUG` check.
> Tip: If you want to disable the paywall during DEBUG builds after you've made sure that it works as expected, you can call `.overrideForDebug` on `FreemiumKit.shared` within an `#if DEBUG` check like this:
>
> ```swift
> WindowGroup {
> MainView()
> .onAppear {
> #if DEBUG
> FreemiumKit.shared.overrideForDebug(purchasedTier: 1)
> #endif
> }
> }
> .environmentObject(FreemiumKit.shared)
> ```
## Showing the Paywalls
Expand Down

0 comments on commit bef9b0f

Please sign in to comment.