Skip to content

Commit

Permalink
Flutter 3.2.1 + SK2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lutik-sun committed Nov 21, 2024
1 parent ed5c8e9 commit 7badfb7
Show file tree
Hide file tree
Showing 48 changed files with 1,241 additions and 411 deletions.
22 changes: 18 additions & 4 deletions versioned_docs/version-3.0/adapty-paywall-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadataTitle: ""
import Zoom from 'react-medium-image-zoom';
import 'react-medium-image-zoom/dist/styles.css';

We’re excited to introduce our **New Paywall Builder**, compatible with Adapty SDK v3.0 and later! This advanced no-code tool makes creating custom paywalls more intuitive and powerful than ever, allowing you to craft beautiful, engaging paywalls with ease—no technical or design expertise required!
We’re excited to introduce our **New Paywall Builder**, compatible with Adapty SDK v3.0 (3.2.0 for Flutter) and later! This advanced no-code tool makes creating custom paywalls more intuitive and powerful than ever, allowing you to craft beautiful, engaging paywalls with ease—no technical or design expertise required!

## Key Features of the New Paywall Builder

Expand All @@ -16,21 +16,25 @@ We’re excited to introduce our **New Paywall Builder**, compatible with Adapty
- **Revamped Existing Elements**: Existing elements have been significantly improved, offering more options and capabilities to bring your paywall ideas to life.

:::warning
This section describes the new Paywall Builder, compatible with Adapty SDK v3.0 and later which is now available for iOS, Android, and React Native only. For information on the legacy Paywall Builder compatible with Adapty SDK v2.x or earlier, see [Design paywalls with legacy Paywall Builder](adapty-paywall-builder-legacy).
This section describes the new Paywall Builder, compatible with Adapty SDK v3.0 (3.2.0 for Flutter) and later which is now available for iOS, Android, Flutter, and React Native only. For information on the legacy Paywall Builder compatible with Adapty SDK v2.x or earlier, see [Design paywalls with legacy Paywall Builder](adapty-paywall-builder-legacy).
:::

## Structure of a paywall

In the new Adapty Paywall Builder, a paywall is composed of the following:

- [**Layout**](paywall-layout-and-products): This is the foundational layer of the paywall, setting the background color and defining how products are displayed and top buttons positioned.
- [**Layout**](https://docs.adapty.io/v3.0/docs/paywall-layout-and-products): This is the foundational layer of the paywall, setting the background color and defining how products are displayed and top buttons positioned.
- [**Hero Image**](paywall-head-picture): The main picture of the paywall.
- **Main Area**: Here, you can place various elements like a product block, carousels, images, cards, texts, buttons, and lists.
- **Footer**: Similar to the main area but it's a container that's always sticking to the bottom of the paywall on top of the main area. You can add as many elements as needed, and they will be arranged from top to to bottom inside a footer in the same order shown in the left pane.
- [**Elements**](adapty-paywall-builder#paywall-elements): The building blocks placed in the main area or footer to create your paywall. They are stacked in the order they appear in the left pane, from top to bottom. You can nest elements within each other, combine them into cards, or display them in a carousel.

## How to start designing a paywall with new Paywall Builder

:::warning
The new Paywall Builder is available for iOS and Android only and requires Adapty SDK v3.0 or later. Please make sure you've [upgraded to Adapty SDK v3.0 or later](migration-to-adapty-sdk-v3) for your new paywalls to function properly!
:::

To use the Adapty Paywall Builder:

1. Open the [**Products and Paywalls**](https://app.adapty.io/paywalls) section in the Adapty main menu and click the **Paywall** tab to open it.
Expand Down Expand Up @@ -142,6 +146,7 @@ The elements you add to your paywall appear in the left pane of the Paywall wind

- **Simple Elements**: These are individual items that cannot contain other elements. Examples include text, images, and buttons.


<Zoom>
<img src={require('./img/210c8e2-simple_elements.webp').default}
style={{
Expand All @@ -153,13 +158,18 @@ The elements you add to your paywall appear in the left pane of the Paywall wind
/>
</Zoom>





- **Compound Elements**: These can contain other elements or have their own structure. Examples include:
- [Product lists](paywall-product-block) with products
- [Carousels](paywall-carousel) with child elements
- [Cards](paywall-card) with child elements
- Lists with its list items
- Link blocks with links inside


<Zoom>
<img src={require('./img/8a23be4-compound_elements.webp').default}
style={{
Expand All @@ -171,14 +181,18 @@ The elements you add to your paywall appear in the left pane of the Paywall wind
/>
</Zoom>





**Enhancements** you can add include:

1. [Predefined tag variables for product info](paywall-builder-tag-variables)
2. [Custom tags](custom-tags-in-paywall-builder)
3. [Custom fonts](using-custom-fonts-in-paywall-builder)
4. [Localization](add-paywall-locale-in-adapty-paywall-builder)

Once configured, you can [add paywalls to placements](add-audience-paywall-ab-test) to display them in your mobile app. For more details on displaying paywalls, see [Display Paywall Builder paywalls](display-pb-paywalls).
Once configured, you can [add paywalls to placements](add-audience-paywall-ab-test) to display them in your mobile app. For more details on displaying paywalls, see [Display Paywall Builder paywalls](display-pb-paywalls).

## Customization Options

Expand Down
38 changes: 36 additions & 2 deletions versioned_docs/version-3.0/custom-tags-in-paywall-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ Custom tags are only available on AdaptyUI SDK v.2.1.0 and higher

Custom tags let you avoid creating separate paywalls for different scenarios. Imagine a single paywall that adapts dynamically based on user data. For example, instead of a generic "Hello!", you could greet users personally with "Hello, John!" or "Hello, Ann!"

:::warning

This section describes the new Paywall Builder, compatible with Adapty SDK v3.0 (3.2.0 for Flutter) and later which is now available for iOS, Android, Flutter, and React Native only. For information on the legacy Paywall Builder compatible with Adapty SDK v2.x or earlier, see [Custom tags in legacy Paywall Builder](custom-tags-in-paywall-builder).

:::

Here are some ways you can use custom tags:

- Display the user’s name or email on the paywall.
Expand All @@ -24,7 +30,7 @@ Here are some ways you can use custom tags:
Custom tags help you create a flexible paywall that adapts to various situations, making your app's interface more personalized and engaging.

:::warning
Make sure to add fallbacks for every line with custom tags,.
Make sure to add fallbacks for every line with custom tags.

Remember to include fallbacks for every line with custom tags.

Expand Down Expand Up @@ -81,26 +87,54 @@ To use custom tags in your mobile app, create a tagResolver object—a dictionar

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

```swift
let tagResolver = [
"USERNAME": "John",
]
]

let paywallConfiguration = try await AdaptyUI.getPaywallConfiguration(
forPaywall: paywall,
tagResolver: tagResolver // or any other AdaptyTagResolver protocol implementation
)
```
</TabItem>
<TabItem value="kotlin" label="Kotlin" default>

```kotlin
val customTags = mapOf("USERNAME" to "John")
val tagResolver = AdaptyUiTagResolver { tag -> customTags[tag] }
```
</TabItem>
<TabItem value="java" label="Java" default>

```java
Map<String, String> customTags = new HashMap<>();
customTags.put("USERNAME", "John");
AdaptyUiTagResolver tagResolver = customTags::get;
```
</TabItem>

<TabItem value="Flutter" label="Flutter" default>

```dart
final customTags = {
'USERNAME': 'John',
};
try {
final view = await AdaptyUI().createPaywallView(
paywall: paywall,
customTags: customTags,
);
} on AdaptyError catch (e) {
// handle the error
} catch (e) {
// handle the error
}
```
</TabItem>

<TabItem value="rn" label="React Native" default>

```typescript
Expand Down
8 changes: 2 additions & 6 deletions versioned_docs/version-3.0/display-pb-paywalls.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@ import Details from '@site/src/components/Details';

With Adapty, you can configure paywalls remotely and define which products to display in your app, eliminating the need to hardcode products.

here are two ways to customize a paywall in the Adapty Dashboard:

- The simple, no-code tool called the [**Paywall Builder**](adapty-paywall-builder)
- The flexible [**remote config**](customize-paywall-with-remote-config), a JSON file containing the data needed to render the paywall on the device

:::warning
This guide covers the process for **new Paywall Builder paywalls** only. The new Paywall Builder is currently supported only on iOS and Android, as it requires SDK v3.0, which is available for iOS, Android, and React Native only. Support for Flutter and Unity is coming soon.
This guide covers the process for **new Paywall Builder paywalls** only. The new Paywall Builder is currently supported only on iOS, Android, React Native, and Flutter as it requires SDK v3.0 (v3.2.0 for Flutter), which is not yet available for Unity. Support for Unity is coming soon.

- For displaying **legacy Paywall Builder paywalls**, check out [Display paywalls designed with legacy Paywall Builder](display-legacy-pb-paywalls).

- For displaying **remote config paywalls**, see [Display remote config paywalls](display-remote-config-paywalls).
:::

Expand Down
13 changes: 9 additions & 4 deletions versioned_docs/version-3.0/facebook-ads.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,22 @@ Because of iOS IDFA changes in iOS 14.5, if you use Facebook integration, make s

<Tabs>
<TabItem value="Swift" label="iOS (Swift)" default>

```swift
import FacebookCore

let builder = AdaptyProfileParameters.Builder()
.with(facebookAnonymousId: AppEvents.shared.anonymousID)

Adapty.updateProfile(params: builder.build()) { error in
if error != nil {
// handle the error
}
do {
try Adapty.updateProfile(params: builder.build())
} catch {
// handle the error
}
```
</TabItem>
<TabItem value="kotlin" label="Android (Kotlin)" default>

```kotlin
val builder = AdaptyProfileParameters.Builder()
.withFacebookAnonymousId(AppEventsLogger.getAnonymousAppDeviceGUID(context))
Expand All @@ -154,17 +156,20 @@ Adapty.updateProfile(builder.build()) { error ->
```
</TabItem>
<TabItem value="Flutter" label="Flutter (Dart)" default>

```text
There is no official SDK for Flutter
```
</TabItem>
<TabItem value="Unity" label="Unity (C#)" default>

```csharp
anonymousID is not available in the official SDK
https://github.com/facebook/facebook-sdk-for-unity/issues/676
```
</TabItem>
<TabItem value="RN" label="React Native (TS)" default>

```typescript
import { adapty } from 'react-native-adapty';
import { AppEventsLogger } from 'react-native-fbsdk-next';
Expand Down
Loading

0 comments on commit 7badfb7

Please sign in to comment.