Ask a Question

isActive = false

When I get a successful subscription result from Adapty.makePurchase method, adapty profile in the closure of the method doesn't contain any active subscription. In a while(2-3 minutes) the didLoadLatestProfile gets the profile with active subscription. Why does Adapty return the wrong info in the profile after subscription? Sandbox environment iOS.

product repurchase dont open pay modal second time

With a sandbox account, consumable or subscription products work correctly the first time. But when I try to buy consumables a second time and more Adapty.makePurchase return success the actual pay modal did not even show up. Seems like it somehow skipped this part. Adapty analytics payments don't record for the user as well Recently I switched from v1 to v2 App Store Notification as well as upgraded adapty ios sdk to 2.9.0 + Not sure if it is somehow related but I assume so. Any suggestions? Will the same behavior impact production? I tried creating a new sandbox account but had the same behavior.

Using paywall builder to make purchases outside of Apple/Google

Is it possible? Hi, I want to implement IAP where the Appstore/GooglePlay are not working at the moment, or alternative stores are used. The most suitable candidate is "void paywallViewDidStartPurchase()" from AdaptyUI. All the necessary information is already there, but there is no way to prevent the system IAP dialog from being shown. Maybe there is some way to start a custom checkout process from paywall builder?

Android SDK 2.9.1 > Error : 400 Bad Request > setVariationId()

Hi, Team We are facing the below issues when trying to set up an event after purchase. Ref Doc: <https://docs.adapty.io/docs/android-observer-mode#ab-tests-analytics> > Request is unsuccessful. <https://api.adapty.io/api/v1/sdk/in-apps/transaction-variation-id/> Code: 400, Response: {"errors":[{"detail":"Transaction with this id does not exist","status":"400","source":{"pointer":"/data"},"code":"TRANSACTION_NOT_FOUND"}]} ```java Adapty.setVariationId(purchase.getOrderId(), paywall.getVariationId(), new ErrorCallback() { @Override public void onResult(@Nullable AdaptyError error) { if (error == null) { ObLogger.i(TAG, "setVariationId onResult: EventSent --> "); } else { ObLogger.i(TAG, "setVariationId onResult: error --> " + error.toString()); } } }); ``` > Note: > > 1. Paywall: Comes from "Adapty.getPaywall()" function > 2. Purchase: Comes from GooglePlayBilling "onPurchasesUpdated()" method. > > SDK : implementation 'io.adapty:android-sdk:2.9.1'

How to use AdaptyUI iOS

Здравствуйте! У меня есть paywall, который собран с помощью Paywall Builder. Я нашла, что для отображения таких paywall следует использовать отдельный модуль AdaptyUI. Как написано на странице <https://github.com/adaptyteam/AdaptyUI-iOS> я получаю paywall и затем должна использовать метод AdaptyUI.getViewConfiguration(paywall:locale:), но у меня появляется ошибка, так как доступный для вызова метод это - AdaptyUI.getViewConfiguration(data: , completion: ). В одном из проектов удалось отобразить paywall с использованием этого AdaptyUI.getViewConfiguration(paywall:locale:) метода, но для этого пришлось версию Adapty понизить до 2.8.0, хотя сейчас актуальная 2.9.3. Я также пробовала получить конфигурацию отображения с помощью paywall.remoteConfig и paywall.remoteConfigString, но и там и там получаю nil. Подскажите, пожалуйста, как правильно получить и отобразить paywall, созданный с помощью Paywall Builder?

The operation couldn’t be completed. (AdaptyErrorDomain error 1000.)

Здравствуйте! Пытаюсь подключить Adapty в свой проект, но получаю такую ошибку: [Adapty v2.8.0] - ERROR: [UI 2.0.2] #d8JvHu# loadProducts fail: StoreKitManagerError.noProductIDsFound([2.8.0]\: Adapty/SK1ProductsFetcher.swift#45) didFailLoadingProductsWith error = The operation couldn’t be completed. (AdaptyErrorDomain error 1000.) Вот так получаю paywall и отображаю его: Adapty.getPaywall(id, locale: "en") { result in switch result { case let .success(paywall): // the requested paywall self.adaptyPaywall = paywall Adapty.logShowPaywall(paywall) AdaptyUI.getViewConfiguration(forPaywall: paywall, locale: "en") { result in switch result { case let .success(viewConfiguration): let visual = AdaptyUI.paywallController(for: paywall, viewConfiguration: viewConfiguration, delegate: self) self.present(visual, animated: false) case let .failure(error): print("AdaptyUI getViewConfiguration error = \(error.localizedDescription)") } } case let .failure(error): // handle the error print("Adapty getPaywall error = \(error.localizedDescription)") } }

Adapty react-native/expo paywall login event

Hi, I see that there is an option to add a 'Login' button to the bottom of paywall next to the terms, privacy, restore, etc in the adapty GUI however I do not see any events or documentation on how to know when a user clicks the login button so that I can respond to that event. Any help would be greatly appreciated, I have provided code below to show how I am getting my paywall and a few of the current events that I am using to trigger off of. ``` const paywall = await adapty.getPaywall(id, locale) const view = await createPaywallView(paywall) // onPurchaseCompleted for now adapty.addEventListener('onLatestProfileLoad', () => { loginNavigation.navigate('Login', { firstTimeSubscriber: !isPastSubscriber, }) }) unsubscribe = view.registerEventHandlers({ onLoadingProductsFailed() { setErrorText( 'Something went wrong, please check your network and try again', ) }, onPurchaseFailed() { setErrorText( 'Something went wrong, please check your network and try again', ) }, onRenderingFailed() { setErrorText( 'Something went wrong, please check your network and try again', ) }, // etc, no onLoginClicked() or something similar? ```

Error when Accessing Native Module in React Native

Hello Adapty community, I hope you're all doing well. I'm currently facing an issue in my React Native application, and I could use some guidance. I'm encountering the following error: TypeError: null is not an object (evaluating 'react_native_1.NativeModules[bridge_1.MODULE_NAME][bridge_1.HANDLER_NAME]') This error occurs when I'm trying to access a native module within my React Native app. I've double-checked the module's existence and initialization, but I'm still facing this issue. I would greatly appreciate any insights or suggestions on how to resolve this error. If you have any experience with similar issues or can point me in the right direction for troubleshooting, I'd be very grateful. Thank you in advance for your help. Best regards, Meet

onPurchaseCompleted Not firing "2.7.0-canary.1"

``` import React, { useEffect, useState } from 'react' import { StyleSheet, Image, View, ActivityIndicator } from 'react-native' import { useNavigation } from '@react-navigation/native' import { adapty } from 'react-native-adapty' // "2.7.0-canary.1" import { createPaywallView } from '@adapty/react-native-ui' //"^2.0.0-canary.1" import { useAppDispatch } from '../state/store' import { loadLessonsAsync } from '../state/slices/lessonSlice' const LandingPage = () => { const navigation = useNavigation() const thunkDispatch = useAppDispatch() let unsubscribe: (() => void) | undefined const [isLoading, setIsLoading] = useState(false) const loadLessons = async () => { thunkDispatch(loadLessonsAsync()) } const showPaywall = async () => { setIsLoading(true) try { const id = 'onboarding.v1' const locale = 'en' const paywall = await adapty.getPaywall(id, locale) // const products = await adapty.getPaywallProducts(paywall) const view = await createPaywallView(paywall) unsubscribe = view.registerEventHandlers({ onCloseButtonPress() { console.log('close button press') // view.dismiss(); return true }, onProductSelected() { console.log('product selected') }, onLoadingProductsFailed(error) { console.log('loading products failed', error) }, onPurchaseCancelled() { console.log('purchase cancelled') }, onPurchaseCompleted(profile) { console.log('purchase completed ', profile) loadLessons().then(() => { navigation.navigate('Dashboard' as never) }) return true }, onPurchaseFailed(error) { console.log('purchase error ', error) }, onPurchaseStarted() { console.log('purchase started') }, onRenderingFailed(error) { console.log('error rendering ', error) }, onRestoreCompleted(profile) { console.log('restore completed ', profile) console.log(profile) loadLessons().then(() => { navigation.navigate('Dashboard' as never) }) return true }, onRestoreFailed(error) { console.log('restore failed', error) }, onAction(action) { console.log('action', action) }, }) await view.present() } catch (error) { console.error(error) } finally { setIsLoading(false) } } useEffect(() => { // will check if not subscribed in future // after the user subscribes, if we can get enough info to have them in firebase // then we can add them automatically and drop them on the dashboard showPaywall() return () => { if (unsubscribe) { unsubscribe() } } // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( <View style={styles.pageContainer}> {isLoading && ( <View style={styles.spinnerOverlay}> <ActivityIndicator size="large" color="#ffffff" /> </View> )} <Image source={require('../../assets/images/appIcon.png')} resizeMode="contain" style={styles.image} /> </View> ) } const styles = StyleSheet.create({ pageContainer: { backgroundColor: '#6B53FF', flex: 1, alignItems: 'center', justifyContent: 'center', resizeMode: 'contain', }, image: { width: '100%', height: '100%', }, spinnerOverlay: { position: 'absolute', top: 0, bottom: 0, left: 0, right: 0, backgroundColor: 'rgba(107,83,255,0.8)', zIndex: 1000, justifyContent: 'center', alignItems: 'center', }, }) export default LandingPage ``` Hi I am trying to render a paywall that I built in adapty. It is rendering fine and I am able to make a purchase that gets reflected in the adapty dashboard and in my sandbox ios settings. However most of my event handlers never get called. The main one I need is onPurchaseCompleted. This never gets called even after a successful purchase. The only ones that ever get called are onProductSelected, onPurchaseStarted, and onRestoreCompleted (when I restore). Any help would be greatly appreciated

Access leves response is always false for "profile.accessLevels['premium']?.isActive ?? false" in Android

Hello, I have flutter app with adapty_flutter: 2.6.2 integrated. It works fine wih iOS but when I test it using Android sanbox testing for subscriptions the above method always gives me false response even after making purchases. Is this a bug. We have also created and uploaded service account key using these steps: <https://docs.adapty.io/docs/service-account-key-file> But at the moment Google do not require steps 1 to 3 to be done in play console as per their latest update. is this the reason it is creating the issues? Also why Adapty document is still not updated in this case. Please help me understand the issue ASAP. Many Thanks