Skip to content
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

[IOS] [TestFlight] Buy/Restore problem with 2 devices #1554

Open
hooliapps opened this issue Apr 5, 2024 · 1 comment
Open

[IOS] [TestFlight] Buy/Restore problem with 2 devices #1554

hooliapps opened this issue Apr 5, 2024 · 1 comment

Comments

@hooliapps
Copy link

Hello

I'm tring to test In App Purchases update with TestFlight with 1 iphone and 1 ipad (same email icloud).

  1. On iPhone (OK)
  • I buy the auto-renew purchase
  • Activation is OK
  • I delete the app, then reinstall
  • When i start Store, the buy is auto re-activated: OK
  1. On the ipad (not ok)
  • I start store, nothing
  • I click Restore purchase, nothing
  • I click "Buy" button, then i see a message : I already own the subscription, and i cannot buy it anymore / neither restore

Do you know please if this problem can be due to TestFlight ? Or plugin ?

  • I use cordova-plugin-purchase since 2018, now version 13.10.1

Code:

function initStore() {
storeUrl = iapFoveaValidator;
CdvPurchase.store.validator = storeUrl;
CdvPurchase.store.register([{.... products
CdvPurchase.store.ready(function() {
console.log('CdvPurchase.store.ready()');
});
}

CdvPurchase.store.when().approved(function(transaction) {
	
	console.log('CdvPurchase.store.when().approved(transaction)');
	
	if (isIOS) {
		if (transaction.products && transaction.products[0] && transaction.products[0].id === '%THEID%') {
			transaction.finish();
			return;
		}
		if (transaction.state === 'approved') {
			transaction.verify();
		}
	}
	else {
		transaction.verify();
	}
	
});

function storeRestorePurchases() {
CdvPurchase.store.restorePurchases();
}

@hooliapps
Copy link
Author

Hello, do you have news of the subject please ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant