12

I am working on an auto-renewable subscription IAP in my iOS app. I plan to have 3 different tiers within the same subscription group. In my testing, I have been able to successfully purchase a subscription, see that it renews for a few times on sandbox and then stops after 5 or 6 tries. This part works fine. But I want to try upgrading from one tier to a higher tier from the app. This time, when I try to add a SKPayment with the new (upgraded) productID to the payment queue, I first get an alert "Do you want to modify your subscription to ...", and after I hit continue, I get a confirmation message, but I also get a callback in SKPaymentQueue: updatedTransactions with state Failed. The error says:

"failed transaction error = Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}

Any ideas why this might be happening, and whether it's even possible to test for subscription group updates from the sandbox? If not, then how would you go about testing this?

Z S
  • 7,039
  • 12
  • 53
  • 105
  • make sure your bundle id same as in ituens or did you login with test account in itunes? seems your test account has become invalidated. – karthikeyan May 07 '18 at 11:42
  • Add a new user in sandbox tester . Check with that user It might work. Sandbox testing generally have these issues. – Shivam Tripathi May 07 '18 at 11:42
  • 3
    It isn't possible to test upgrades as far as I know. As long as you process the most recent `in_app` from the receipt you should be fine. – Paulw11 May 07 '18 at 11:55
  • 1
    Tried with a new sandbox user; same result. Initial purchase goes through just fine, but trying to upgrade results in a Failed payment with "Cannot connect to iTunes Store" message. [Not sure about the down-votes. Can someone please explain why they downvoted?] – Z S May 07 '18 at 12:54
  • @Paulw11 it seems that there is a new IAP in the receipt, just that the updatedTransactions is called with "Failed". Is that also true for production? Any idea how to test this out properly before release? – Z S May 07 '18 at 13:00
  • @ZS Did you find any solution to this? – user3519594 Jun 18 '18 at 13:00
  • @ZS Did you have any solutions so far ? – Wei Loon Wong Jul 30 '18 at 04:41
  • @Paulw11 Can we test downgrade on sandbox ? – Wei Loon Wong Jul 30 '18 at 04:42
  • 1
    Not really. A downgrade is just a renewal with the lower tier product at the next renewal time so as long as your app correctly processes the current IAP tier it should be fine – Paulw11 Jul 30 '18 at 04:49
  • @ZS Am also getting the same issue. Have u found any solution? – Zeesha Jan 03 '19 at 12:20
  • I never found a solution, other than ignoring the error and calling `finishTransaction` if I'm in DEBUG mode. Seems to work fine in production. – Z S Feb 02 '19 at 06:08

0 Answers0