Post

Replies

Boosts

Views

Activity

In App Purchase sanbox reopens repeatedly and does not send purchased status in stream
I am facing a weird issue while making auto renewable subscription through in_app_purchase package in IOS simulator 17.0. This is the preview of my issue: https://www.loom.com/share/0a483d3dcba44807bec0a38e0a752e66?sid=b42a575e-aa3b-46c9-8fa5-8ee24cf40900 What works well: I am able to fetch my subscription product from the app store. Future<void> _getProducts() async { ProductDetailsResponse response = await _iap.queryProductDetails(productIds.toSet()); if (response.notFoundIDs.isNotEmpty) { print('These products were not found: ${response.notFoundIDs.join(', ')}'); } _products = response.productDetails; notifyListeners(); } I am able to open the sandbox and start the pruchase using sanbox tester account in the apple app store. Future<void> buyProduct(ProductDetails product) async { final PurchaseParam purchaseParam = PurchaseParam(productDetails: product); try { await _iap.buyNonConsumable(purchaseParam: purchaseParam); } catch (e) { print("$e"); } } The sanbox shows the "DONE" UI, but I NEVER get the PurchasedStatus.purchased in my stream, and the sandbox reopens again. The cycle repeats Here is the output of my flutter doctor -v • Flutter version 3.13.1 on channel stable at /Users/muhammadhamadjamal/Documents/FlutterDev/sdk/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision e1e47221e8 (3 months ago), 2023-08-22 21:43:18 -0700 • Engine revision b20183e040 • Dart version 3.1.0 • DevTools version 2.25.0 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) • Android SDK at /Users/muhammadhamadjamal/Library/Android/sdk • Platform android-33, build-tools 33.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.0) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15A240d • CocoaPods version 1.13.0 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301) [✓] VS Code (version 1.84.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.76.0 [✓] Connected device (3 available) • iPhone 15 Pro Max (mobile) • DC9EDD04-0B17-4D27-BD2A-966F06BFCF7F • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator) • macOS (desktop) • macos • darwin-x64 • macOS 14.0 23A344 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 119.0.6045.105 [✓] Network resources • All expected network resources are available. • No issues found!
1
1
475
Nov ’23