From bddfd431b33f9fbdeb7a38f260f27d82caecac33 Mon Sep 17 00:00:00 2001 From: Liudmila Nemkova Date: Thu, 10 Oct 2024 15:34:45 +0200 Subject: [PATCH] Troubleshooting for paywalls load too long (clearing purchase history as a solution), brocken links --- .../version-3.0/android-push-notifications.md | 34 +++++++++++++++++++ .../version-3.0/fallback-paywalls.md | 5 +-- .../version-3.0/sdk-installation-android.md | 2 +- .../sdk-installation-reactnative.md | 2 +- .../troubleshooting-test-purchases.md | 2 +- .../version-3.0/use-fallback-paywalls.md | 6 ++-- 6 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 versioned_docs/version-3.0/android-push-notifications.md diff --git a/versioned_docs/version-3.0/android-push-notifications.md b/versioned_docs/version-3.0/android-push-notifications.md new file mode 100644 index 00000000..ed8d7b26 --- /dev/null +++ b/versioned_docs/version-3.0/android-push-notifications.md @@ -0,0 +1,34 @@ +--- +title: "Push Notifications" +description: "" +metadataTitle: "" +--- + + + +import Zoom from 'react-medium-image-zoom'; +import 'react-medium-image-zoom/dist/styles.css'; + +To send push notifications you have to enter Firebase Cloud Messaging \(FCM\) **server key** in Adapty dashboard. Open Firebase, choose the app you want to use, go to **Project Settings > Cloud Messaging**, and copy the server key. If you don't have one you can create it by clicking the Add server key button in the right top corner. + + + + + + + + \ No newline at end of file diff --git a/versioned_docs/version-3.0/fallback-paywalls.md b/versioned_docs/version-3.0/fallback-paywalls.md index aad6abcb..1707aadf 100644 --- a/versioned_docs/version-3.0/fallback-paywalls.md +++ b/versioned_docs/version-3.0/fallback-paywalls.md @@ -13,8 +13,8 @@ A paywall is an in-app storefront where customers can see and purchase products Adapty generates fallbacks as a JSON file in the necessary format, reflecting English versions of the paywalls you've configured in the Adapty Dashboard. To let your users see your fallback paywall: 1. Download the file from the Adapty Dashboard - one per app store and Adapty SDK version - as described below. -2. For iOS, Android, and React Native: Place it alongside your app on the user's device, and pass it to the `.setFallbackPaywalls` method. See detailed instructions for [iOS](ios-use-fallback-paywalls), [Android](android-use-fallback-paywalls), and [React Native](react-native-use-fallback-paywalls). -3. For Flutter and Unity: Pass the contents of the file (the JSON string itself) to the `.setFallbackPaywalls` method. See detailed instructions for [Flutter](flutter-use-fallback-paywalls) and [Unity](unity-use-fallback-paywalls). +2. For iOS, Android, and React Native: Place it alongside your app on the user's device, and pass it to the `.setFallbackPaywalls` method. See detailed instructions for [iOS](ios-use-fallback-paywalls), [Android](android-use-fallback-paywalls), and [React Native](/2.0/react-native-use-fallback-paywalls). +3. For Flutter and Unity: Pass the contents of the file (the JSON string itself) to the `.setFallbackPaywalls` method. See detailed instructions for [Flutter](/2.0/flutter-use-fallback-paywalls) and [Unity](/2.0/unity-use-fallback-paywalls). ## Download fallback paywalls as a file in the Adapty Dashboard @@ -33,6 +33,7 @@ To download the JSON file with the fallback paywalls: 1. Open the **[Paywalls and Products](https://app.adapty.io/products)** section from the Adapty main menu, then select the **Products** tab or just the **[Placements](https://app.adapty.io/placements)** section in the Adapty main menu. + The key you can find in the **Public SDK key** field of your app settings in Adapty: [**App settings**-> **General** tab -> **API keys** subsection](https://app.adapty.io/settings/general).

Make sure you use the **Public SDK key** for Adapty initialization, the **Secret key** should be used for [server-side API](getting-started-with-server-side-api) only.

| | **observerMode** | optional |

A boolean value that controls [Observer mode](observer-vs-full-mode). Turn it on if you handle purchases and subscription status yourself and use Adapty for sending subscription events and analytics. The default value is `false`.

🚧 When running in Observer mode, Adapty SDK won't close any transactions, so make sure you're handling it.

| -| **customerUserId** | optional | An identifier of the user in your system. We send it in subscription and analytical events, to attribute events to the right profile. You can also find customers by `customerUserId` in the [**Profiles and Segments**](https://app.adapty.io/profiles/users) menu. If you don't have a user ID at the time of Adapty initialization, you can set it later using `.identify()` method. Read more in the [Identifying users](android-identifying-users) section. | +| **customerUserId** | optional | An identifier of the user in your system. We send it in subscription and analytical events, to attribute events to the right profile. You can also find customers by `customerUserId` in the [**Profiles and Segments**](https://app.adapty.io/profiles/users) menu. If you don't have a user ID at the time of Adapty initialization, you can set it later using `.identify()` method. Read more in the [Identifying users](identifying-users) section. | | **IpAddressCollectionDisabled** | optional |

A boolean parameter. Set to `true` to disable the collection of the user IP address. The default value is `false`.

Parameter works with `AdaptyConfig.Builder` only.

| diff --git a/versioned_docs/version-3.0/sdk-installation-reactnative.md b/versioned_docs/version-3.0/sdk-installation-reactnative.md index b620ee33..428c0843 100644 --- a/versioned_docs/version-3.0/sdk-installation-reactnative.md +++ b/versioned_docs/version-3.0/sdk-installation-reactnative.md @@ -178,7 +178,7 @@ Activation parameters: |---------|--------|-----------| | **PUBLIC_SDK_KEY** | required |

A Public SDK Key is the unique identifier used to integrate Adapty into your mobile app. You can copy it in the Adapty Dashboard: [**App settings** -> **General **tab -> **API Keys** section](https://app.adapty.io/settings/general).

**SDK keys** are unique for every app, so if you have multiple apps make sure you choose the right one.

Make sure you use the **Public SDK key** for the Adapty initialization, since the **Secret key** should be used for the [server-side API](getting-started-with-server-side-api) only.

| | **observerMode** | optional |

A boolean value controlling [Observer mode](observer-vs-full-mode) . Turn it on if you handle purchases and subscription status yourself and use Adapty for sending subscription events and analytics. The default value is `false`.

🚧 When running in Observer mode, Adapty SDK won't close any transactions, so make sure you're handling it.

| -| **customerUserId** | optional |

An identifier of a user in your system. We send it with subscription and analytical events, so we can match events to the right user profile. You can also find customers using the `customerUserId` in the [Profiles](profiles-crm) section.

If you don't have a user ID when you start with Adapty, you can add it later using the `adapty.identify()` method. For more details, see the [Identifying users](react-native-identifying-users) section.

| +| **customerUserId** | optional |

An identifier of a user in your system. We send it with subscription and analytical events, so we can match events to the right user profile. You can also find customers using the `customerUserId` in the [Profiles](profiles-crm) section.

If you don't have a user ID when you start with Adapty, you can add it later using the `adapty.identify()` method. For more details, see the [Identifying users](identifying-users) section.

| | **logLevel** | optional | A string parameter that makes Adapty record errors and other important information to help you understand what's happening. | | **\_\_debugDeferActivation** | optional | A boolean parameter, that lets you delay SDK activation until your next Adapty call. This is intended solely for development purposes and **should not be used in production**. | | **ipAddressCollectionDisabled** | optional |

Set to `true` to disable user IP address collection and sharing.

The default value is `false`.

| diff --git a/versioned_docs/version-3.0/troubleshooting-test-purchases.md b/versioned_docs/version-3.0/troubleshooting-test-purchases.md index 9d248456..23f86073 100644 --- a/versioned_docs/version-3.0/troubleshooting-test-purchases.md +++ b/versioned_docs/version-3.0/troubleshooting-test-purchases.md @@ -16,7 +16,7 @@ If you encounter transaction issues, please first make sure you have completed a | No event is present in my testing profile |

A new user profile record is automatically created in Adapty in the following cases:

All transactions and events in a chain are tied to the profile that generated the first transaction. This helps keep the entire transaction history, including trial periods, subscription purchases, renewals, and more linked to the same profile. This means that a new profile record that generated a subsequent translation - we call it a non-original profile - may not have any events associated with it but will retain the granted access level. In some cases, you'll also see `access_level_updated` events here. It's advised to ignore these new, empty profiles and focus on the original ones for a clearer view of the user's transaction history.

This behavior is more prominent for testing scenarios but also normal for production. It should not be treated as a bug or SDK misconfiguration.In order to run the test with only one profile and have fun concise history in one place, create a new test account (Sandbox Apple ID) each time you reinstall the mobile app.

Please see an example of a non-original profile under the table. For more details on profile creation, please see [Profile record creation](profiles-crm#profile-record-creation).

| | Prices do not reflect the actual prices set in App Store Connect |

In both Sandbox and TestFlight which uses the sandbox environment for in-app purchases, it's important to verify that the purchase flow functions correctly, rather than focusing on the accuracy of prices. It's worth noting that Apple's API can occasionally provide inaccurate data, particularly when different regions are configured for devices or accounts. And since the prices come directly from the Store and the Adapty backend does not affect purchase prices in any way, you can ignore any inaccuracy in prices during the testing of the purchases through Adapty.

Therefore, prioritize testing the purchase flow itself over the accuracy of prices to ensure it functions as intended.

| | The transaction time in the **Event Feed** is incorrect | The **Event Feed** uses the time zone set in the **App Settings**. To align the time zone of events with your local time, adjust the **Reporting timezone** in [**App settings** -> **General** tab](https://app.adapty.io/settings/general). | -| Paywalls and products in them load long |

This issue can occur if your test account has a long transaction history. We highly recommend creating a new test account each time, as outlined in our [Create a Sandbox Test Account (Sandbox Apple ID) in App Store Connect](test-purchases-in-sandbox#step-1-create-a-sandbox-test-account--sandbox-apple-id-in-the-app-store-connect) section.

If you're unable to create a new account, you can clear the transaction history on your current account by following these steps on your iOS device:

  1. Open **Settings** and tap **App Store**.
  2. Tap your **Sandbox Apple ID**.
  3. In the popup, select **Manage**.
  4. On the **Account Settings** page, tap **Clear Purchase History**.

For more details, check out the [Apple Developer documentation](https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_with_sandbox/#3894622).

| +| Paywalls and products take a long time to load |

This issue can occur if your test account has a long transaction history. We highly recommend creating a new test account each time, as outlined in our [Create a Sandbox Test Account (Sandbox Apple ID) in App Store Connect](test-purchases-in-sandbox#step-1-create-a-sandbox-test-account--sandbox-apple-id-in-the-app-store-connect) section.

If you're unable to create a new account, you can clear the transaction history on your current account by following these steps on your iOS device:

  1. Open **Settings** and tap **App Store**.
  2. Tap your **Sandbox Apple ID**.
  3. In the popup, select **Manage**.
  4. On the **Account Settings** page, tap **Clear Purchase History**.

For more details, check out the [Apple Developer documentation](https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_with_sandbox/#3894622).

| Here is an example of a non-original profile. Notice the absence of events in the **User history** and the presence of an access level. diff --git a/versioned_docs/version-3.0/use-fallback-paywalls.md b/versioned_docs/version-3.0/use-fallback-paywalls.md index 25a44226..2fd911eb 100644 --- a/versioned_docs/version-3.0/use-fallback-paywalls.md +++ b/versioned_docs/version-3.0/use-fallback-paywalls.md @@ -13,6 +13,6 @@ Adapty generates fallbacks as a JSON file in the necessary format, reflecting En - [iOS](ios-use-fallback-paywalls) - [Android](android-use-fallback-paywalls) -- [Flutter](flutter-use-fallback-paywalls) -- [React Native](react-native-use-fallback-paywalls) -- [Unity](unity-use-fallback-paywalls) \ No newline at end of file +- [Flutter](/2.0/flutter-use-fallback-paywalls) +- [React Native](/2.0/react-native-use-fallback-paywalls) +- [Unity](/2.0/unity-use-fallback-paywalls) \ No newline at end of file