From bef9b0fe8ff727590b1705c25062aa407f41ecce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20Gu=CC=88ndu=CC=88z?= Date: Thu, 15 Aug 2024 09:22:56 +0200 Subject: [PATCH] Further clarify how to override for debug --- Sources/FreemiumKit/FreemiumKit.docc/SetupGuide.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Sources/FreemiumKit/FreemiumKit.docc/SetupGuide.md b/Sources/FreemiumKit/FreemiumKit.docc/SetupGuide.md index 81a228a..98c3696 100644 --- a/Sources/FreemiumKit/FreemiumKit.docc/SetupGuide.md +++ b/Sources/FreemiumKit/FreemiumKit.docc/SetupGuide.md @@ -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