Discussions

Ask a Question
ANSWERED

RN Android adapty activation

Good day, good sirs! I am trying to activate adapty – react-native - android. Behaviour description: 1. If i try to activate adapty and get a paywall in useEffect in app.js, i get AdaptyError { "adaptyCode": "sdkNotActive", "code": 403, "localizedDescription": "Adapty SDK was not initialized", } Code Example: useEffect(() => { activateAdapty({sdkKey: 'public_live_1xBxwiDq.Hcf8j157rGUd1OtGw9Gv'}); async function fetchPaywall() { const {paywalls} = await adapty.paywalls.getPaywalls(); const bestPaywall = paywalls.find( paywall => paywall.developerId === 'testPayWall', ); setPaywall(bestPaywall); console.log(bestPaywall); } fetchPaywall(); }, []); 2.But if I use it without useEffect, it kinda works – adapty activates and i can see that i am receiving a paywall, but i have infinite rerenders. Would you please be so kind to help me out in this weird scenario?
ANSWERED

updateProfile

Hello! Plz, add 'amplitudeDeviceId' field in d.ts

iOS build breaks after adding adapty pod

We're using Adapty react-native library. After Pod install we fall into cycle dependency during build: Cycle in dependencies between targets 'Adapty' and 'AppAuth'; building could produce unreliable results. This usually can be resolved by moving the target's Headers build phase before Compile Sources. Cycle path: Adapty → CryptoSwift → FBSDKCoreKit → FBSDKCoreKit-FacebookSDKStrings → BVLinearGradient → React → React-Core → boost-for-react-native → DoubleConversion → AppsFlyerFramework → AppAuth → Adapty Headers build phase is already before Compile sources in Adapty. Worth to mention, we're using a slightly different Podfile than standard react natives. We use almost all pods as statics and Adapty is specifically marked to be a dynamic framework.