Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Paywalls docs: add missing code block markers (#252)
Browse files Browse the repository at this point in the history
The code snippets for paywalls didn't correctly render from the code
snippets. This is because they were missing the `[block:file]` markers.
This updates the page to add them.
  • Loading branch information
aboedo authored Aug 7, 2023
1 parent 2976dda commit 410a842
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions docs_source/🚀 Getting Started/displaying-products/paywalls.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,37 +124,38 @@ Use your own hex codes, select a custom color, or use our color picker to select
## How to display a Paywall in your app

1. Option 1: _presentPaywallIfNeeded_ depending on an entitlement
```swift
[block:file]
[
{
"language": "swift",
"name": "Swift",
"file": "code_blocks/🚀 Getting Started/displaying-products/paywalls_1.swift"
"name": "",
"file": "code_blocks/🚀 Getting Started/displaying-products/paywalls/paywalls_1.swift"
}
]
```
[/block]

2. Option 2 _presentPaywallIfNeeded_ with custom logic:
```swift
[block:file]
[
{
"language": "swift",
"name": "Swift",
"file": "code_blocks/🚀 Getting Started/displaying-products/paywalls_2.swift"
"name": "",
"file": "code_blocks/🚀 Getting Started/displaying-products/paywalls/paywalls_2.swift"
}
]
```
[/block]

3. Option 3: present manually:
```swift
[block:file]
[
{
"language": "swift",
"name": "Swift",
"file": "code_blocks/🚀 Getting Started/displaying-products/paywalls_3.swift"
"name": "",
"file": "code_blocks/🚀 Getting Started/displaying-products/paywalls/paywalls_3.swift"
}
]
```
[/block]

## Limitations

**Platforms** (support for more coming)
Expand Down

0 comments on commit 410a842

Please sign in to comment.