Skip to content

Commit

Permalink
Merge branch 'ADP-1816-Integrations-for-iOS-320'
Browse files Browse the repository at this point in the history
* ADP-1816-Integrations-for-iOS-320:
  Changed text around the snippet to match different platforms
  • Loading branch information
Lutik-sun committed Nov 27, 2024
2 parents 03444f3 + 068985d commit 05e4f2f
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions versioned_docs/version-3.0/get-pb-paywalls.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ do {
}
```
</TabItem>
<TabItem value="Swift-Callback" label="Swift" default>
<TabItem value="Swift-Callback" label="Swift-Callback" default>

```swift
Adapty.getPaywall(placementId: "YOUR_PLACEMENT_ID", locale: "en") { result in
Expand Down Expand Up @@ -152,14 +152,11 @@ Response parameters:

After fetching the paywall, check if it includes a `ViewConfiguration`, which indicates that it was created using Paywall Builder. This will guide you on how to display the paywall. If the `ViewConfiguration` is present, treat it as a Paywall Builder paywall; if not, [handle it as a remote config paywall](present-remote-config-paywalls).

For paywalls with a `ViewConfiguration`, use the `getViewConfiguration` method to load the view configuration. In cross-platform SDKs, you can directly call the `createPaywallView` method without manually fetching the view configuration first.

:::warning
The result of the `createPaywallView` method can be used only once. If you need to reuse it, call the `createPaywallView` method again.
:::

<Tabs>
<TabItem value="Swift" label="Swift" default>

For paywalls with a `ViewConfiguration`, use the getPaywallConfiguration method to load the view configuration.

```swift
import Adapty
import AdaptyUI
Expand Down Expand Up @@ -219,6 +216,8 @@ In this example, `CUSTOM_TIMER_NY` and `CUSTOM_TIMER_6H` are the **Timer ID**s o
</TabItem>
<TabItem value="kotlin" label="Kotlin" default>

For paywalls with a `ViewConfiguration`, use the `getViewConfiguration` method to load the view configuration.

```kotlin
if (!paywall.hasViewConfiguration) {
// use your custom logic
Expand Down Expand Up @@ -246,6 +245,8 @@ AdaptyUI.getViewConfiguration(paywall, loadTimeout = 10.seconds) { result ->
</TabItem>
<TabItem value="java" label="Java" default>

For paywalls with a `ViewConfiguration`, use the `getViewConfiguration` method to load the view configuration.

```java
if (!paywall.hasViewConfiguration()) {
// use your custom logic
Expand All @@ -271,6 +272,8 @@ AdaptyUI.getViewConfiguration(paywall, TimeInterval.seconds(10), result -> {
</TabItem>
<TabItem value="Flutter" label="Flutter" default>

In Flutter SDK, directly call the `createPaywallView` method without manually fetching the view configuration first.

```javascript
import 'package:adapty_flutter/adapty_flutter.dart';

Expand Down Expand Up @@ -309,6 +312,8 @@ In the example above, `CUSTOM_TIMER_NY` and `CUSTOM_TIMER_6H` are the **Timer ID
</TabItem>
<TabItem value="React Native" label="React Native (TS)" default>
In React Native SDK, directly call the `createPaywallView` method without manually fetching the view configuration first.
```typescript
import {createPaywallView} from '@adapty/react-native-ui';

Expand Down

0 comments on commit 05e4f2f

Please sign in to comment.