New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not receiving products on iOS #32
Comments
@gildaswise You should use the whole name for productId. |
Can confirm that this is happening to me as well. Using the full example from GitHub, but receive no products nor error. Have also added a product with 'Waiting for Review' status. |
Here is all of my code for IAP for subscriptions. Maybe it's helpful. It works on iOS and Android. I am package locked into class Store {
static Store _instance = new Store();
static Store get instance => _instance;
static String sku = 'when_coin_premium';
static setup() async {
await FlutterInappPurchase.prepare;
final bool isSubscribed = await checkSubscribed();
_saveToFirebase(isSubscribed);
FlutterInappPurchase.endConnection;
}
static Future<bool> subscribe() async {
try {
await FlutterInappPurchase.prepare;
await FlutterInappPurchase.getSubscriptions([sku]);
await FlutterInappPurchase.buySubscription(sku);
FlutterInappPurchase.endConnection;
await _saveToFirebase(true);
return true;
} catch (e) {
return false;
}
}
static Future<bool> checkSubscribed() async {
bool isSubscribed = await FlutterInappPurchase.checkSubscribed(
sku: sku,
duration: Duration(minutes: 5),
grace: Duration(minutes: 1),
);
await _saveToFirebase(isSubscribed);
return isSubscribed;
}
static Future<void> _saveToFirebase(bool isSubscribed) =>
User.instance.ref.child('subscribed').set(isSubscribed ?? false);
} |
My code is working on Android so would be weird that it wouldn't be working on IOS. |
I tried calling
But I called |
@gildaswise Could you check issue and issue here? Also did you complete the |
Finished
|
@gildaswise Did you have to wait for the Agreements, Tax and Banking status to be done or can you fetch products when it is pending? |
@RobertBrunhage I had to click |
Update: it worked now (maybe it had a delay?) on a physical device (iPhone 7+), but nothing on the Simulator yet. |
@gildaswise Actual payment test should be working only on real device with sandbox account. You can only testing fetching in simulator. Will close this since it seems np. |
Payment test and notifications are physical device only on iOS |
Version of flutter_inapp_purchase
0.6.5
Platforms you faced the error (iOS or Android or both?)
iOS
Expected behavior
Receiving product as an IAPItem
Actual behavior
Not receiving anything
Tested environment (Emulator? Real Device?)
Both emulator and real device
Steps to reproduce the behavior
Call
getProducts
with the desired product IDsOther info
I'm using TestFlight with this app and already registered an IAP there, its status is Waiting for Review and I've already checked with @lukepighetti that his IAP worked even with this status.
Also, neither
catchError
ortry/catch
block are working on this code I'm using:The text was updated successfully, but these errors were encountered: