Skip to content

Commit 9447083

Browse files
authored
[Paywalls v2] relative_discount variable description, iPad update (#665)
* Variable description, iPad update * Fix image extension
1 parent 7f6bd3c commit 9447083

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

docs/tools/paywalls-v2/creating-paywalls/variables.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,9 @@ The paywall preview is generated using our example values for each package liste
5757

5858
To see a more accurate preview, we recommend running your application on your physical device or in the simulator, as this will present details based on the actual information for the products you're displaying on that device.
5959
:::
60+
61+
## FAQs
62+
63+
| Question | Answer |
64+
| ------------------ | ------------------|
65+
| How is the `product.relative_discount` variable calculated? | `relative_discount` returns the localized discount percentage of a given package compared to the most expensive package per period that's offered on your paywall. For example, if you're displaying a monthly package that is $10/month, and a yearly package that is $80/year (or $6.67/month), the relative discount for the annual package is 67%. Because of this, we recommend only using this variable within packages that are NOT the most expensive package per period, as the most expensive package will have a null value returned, since its relative discount is null. |

docs/tools/paywalls-v2/displaying-paywalls.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ These docs refer to our beta of Paywalls v2. For our original Paywalls, [click h
1212

1313
### iOS
1414

15-
RevenueCat Paywalls v2 will show paywalls fullscreen, and there are multiple ways to do this with SwiftUI and UIKit.
15+
RevenueCat Paywalls v2 will show paywalls fullscreen on iPhone, and there are multiple ways to do this with SwiftUI and UIKit.
1616

1717
- Depending on an entitlement with `presentPaywallIfNeeded`
1818
- Custom logic with `presentPaywallIfNeeded`
@@ -53,6 +53,11 @@ import objc5 from "!!raw-loader!@site/code_blocks/tools/paywalls_5.m";
5353

5454
]}/>
5555

56+
#### Paywalls on iPad
57+
When using `presentPaywallIfNeeded` to display a paywall on iPad, we'll automatically show a paywall in a modal that is roughly iPhone sized. If instead you prefer to show a paywall that is full screen on iPad, you can use the `PaywallView` or `PaywallViewController` methods instead.
58+
59+
![Paywalls on iPad](/images/paywalls-on-ipad.jpeg)
60+
5661
### Android
5762

5863
RevenueCat Paywalls will, by default, show paywalls fullscreen and there are multiple ways to do this with `Activity`s and Jetpack Compose.
912 KB
Loading

0 commit comments

Comments
 (0)