Ask a Question

Not clear how to verify purchase using Adapty

Hi Adapty team, I am trying to implement a subscription mechanism in my Flutter app (target platform: iOS). I've done all the setup on the App Store Connect side (all the required subscriptions are in place) and now I am trying to implement the client-side logic. I am also using the StoreKit test environment (sandbox) for testing. Also, I completed the setup for iOS app in the Adapty console with all the required data. When I am trying to purchase a subscription, I get the following error: ```dart try { final product = _adaptyProducts.first; final result = await Adapty().makePurchase(product: product); debugPrint('result: $result'); // successful purchase } on AdaptyError catch (adaptyError) { debugPrint('error: $adaptyError'); } catch (e) { debugPrint('error: $e'); } ``` This code throws AdaptyError with the following message: ``` HTTPError.backend(POST /sdk/in-apps/apple/receipt/validate/, [2.4.5]: Adapty/Backend.Validator.swift#21, statusCode: 400, body: {"errors":[{"detail":"21002: The data in the receipt-data property was malformed.","status":"400","source":{"pointer":"/data"},"code":"APPLE_RECEIPT_VALIDATION_ERROR"}]}) ``` Can you please help me to understand what is wrong with my setup? And I figured out that I need to do some receipt verification (unfortunately, I can't find any documentation about the process of purchase with verification). Still, I don't know how to do it.

Flutter adapty.makePurchase(...) takes more ~20 seconds on iOS

After invoking `await adapty.makePurchase(product: event.product);` it takes between 5 seconds and 30 seconds until the purchase dialog of the App Store is purchased which leads to display long loading times to the users. Is this some implementation issue from the client side (flutter app), the communication between Adapty and Apple or something else? I troubleshooted the network from the client side, and doesnt seems to be an issue with the local network. Also i tested on different devices.

Protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable' Flutter error

I have this issue while doing iOS build. Android is good. What I need to do? The error is in this lines // // EventType.swift // Adapty // // Created by Aleksei Valiano on 07.10.2022. // import Foundation enum EventType { case appOpened case paywallShowed(AdaptyPaywallShowedParameters) case onboardingScreenShowed(AdaptyOnboardingScreenParameters) case system(AdaptySystemEventParameters) } extension EventType { enum Name { static let appOpened = "app_opened" static let paywallShowed = "paywall_showed" static let onboardingScreenShowed = "onboarding_screen_showed" static let system = "system_log" } ``` static let systemEvents = [Name.system] var name: String { switch self { case .appOpened: return Name.appOpened case .paywallShowed: return Name.paywallShowed case .onboardingScreenShowed: return Name.onboardingScreenShowed case .system: return Name.system } } ``` } extension EventType: Encodable { func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: Event.CodingKeys.self) switch self { case .appOpened: try container.encode(Name.appOpened, forKey: .type) case let .paywallShowed(value): try container.encode(Name.paywallShowed, forKey: .type) try value.encode(to: encoder) case let .onboardingScreenShowed(value): try container.encode(Name.onboardingScreenShowed, forKey: .type) try value.encode(to: encoder) case let .system(value): try container.encode(Name.system, forKey: .type) let data = try Backend.encoder.encode(value) let string = String(decoding: data, as: UTF8.self) try container.encode(string, forKey: .customData) } } }

Products not showing on iOS production (working everywhere else)

My app was just approved and released on the App Store, but the products are not loading on the paywall. It works fine on the same build from TestFlight, and it is also working on the Play Store on Production. Do I need to configure something to make the products appear on my iOS production paywall? How can I debug this since it only happens on the production version?

401 error | can not activate SDK on "react-native-adapty": "^2.4.8",

adapty.activate(APP_CONFIG.adaptyApiKey) use this to activate. but got error \[Error: #2002 (notActivated): Request is unsuccessful. <https://api.adapty.io/api/v1/sdk/analytics/profiles/"some_id"/> Code: 401, Response: {"errors":[{"detail":"Authentication credentials were not provided.","status":"401","source":{"pointer":"/data"},"code":"not_authenticated"}]}] platform android

how to handle multiple accounts on same phone

I checked the doc and it says if there is the same receipt id, it will all share that one on the same phone in apple. This does not make any sense at all! How can I implemnet automatic account handling then? If I have to implemnet myself what is the point of using Adapty, I can just implement everything,

Can not make iOS archive (Flutter)

I have this error while archiving. Build to device works fine PhaseScriptExecution [CP]\\ Embed\\ Pods\\ Frameworks /Users/o-savenko/Library/Developer/Xcode/DerivedData/Runner-ghfwmtuxwhmolkeymuecakedgfij/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-E4C0770437B4D19D2793BB3F.sh (in target 'Runner' from project 'Runner') cd /Users/o-savenko/StudioProjectssss/GuitarAppCrossPlatform/ios /bin/sh -c /Users/o-savenko/Library/Developer/Xcode/DerivedData/Runner-ghfwmtuxwhmolkeymuecakedgfij/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-E4C0770437B4D19D2793BB3F.sh mkdir -p /Users/o-savenko/Library/Developer/Xcode/DerivedData/Runner-ghfwmtuxwhmolkeymuecakedgfij/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/Runner.app/Frameworks Symlinked... rsync --delete -av --filter P .\*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Adapty.framework" "/Users/o-savenko/Library/Developer/Xcode/DerivedData/Runner-ghfwmtuxwhmolkeymuecakedgfij/Build/Intermediates.noindex/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks" building file list ... rsync: link_stat "/Users/o-savenko/StudioProjectssss/GuitarAppCrossPlatform/ios/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Adapty.framework" failed: No such file or directory (2) done sent 29 bytes received 20 bytes 98.00 bytes/sec total size is 0 speedup is 0.00 rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/9e200cfa-7d96-11ed-886f-a23c4f261b56/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9] Command PhaseScriptExecution failed with a nonzero exit code

Native purchase on ios

It takes too long for the native purchase window to open on ios: +- 20 sec.

Fetching all users through an API

Hi there. I want to implement a feature on our backend side and I need to store some users' data in our own database. Unfortunately, I can not see an API or some solutions to make a GET request and fetch all users' data. Is there any solution to do this in our backend? We use NodeJS as the language of our backend.

#1000 (noProductIDsFound): No In-App Purchase product identifiers were found.

I'm using React native for IOS app. In Adapty, the products are created using app store product id. Paywall list are showing when using adapty.getPaywall(). But the above error is showing when using adapty.getPaywallProducts() function.