libgdx/gdx-pay

Robovm "Cannot Connect to iTunes Store"

hujasonx opened this issue · 3 comments

Hi all, I am receiving the following error on some devices using gdx-pay when trying to purchase items:

"[GdxPay/AppleIOS] Transaction failed: Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}"

Affected devices: iPad Air 2 ios 13.6, iPhone 7 Plus ios 13.6, also the app store review folks encountered this error. Some devices do not face this issue, and some testflight users have mixed results.

gdx-pay version: 1.3.0-SNAPSHOT and 1.2.0 both have this issue
libgdx version: 1.9.8 and 1.9.10 both have this issue
robovm version: 2.3.10-SNAPSHOT and 2.3.5 both have this issue

The issue occurred when testing my own app, but I was able to reproduce the issue using these steps:

  1. Clone https://github.com/libgdx/gdx-pay-example
  2. Rename the IOSLauncher package to the same as the app I am trying to debug.
  3. Replace the MY_ENTITLEMENT constant with a real sku from my app. No other code changes.
  4. Update the launchscreen storyboard, add app icons, and set fullscreenrequired=true to make the project app-store-ready
  5. Build the app and upload to the app store.
  6. Test on Testflight and look at the logs using the console app.
    Edit: I tried this after creating a fresh new app in App Store Connect, and the error still occurs on some devices (the same devices as before)

Steps I have done to debug:

  1. Ensured that all my taxes and agreements have been set up. I already have another ios app that has working in app purchases.
  2. Talked to the apple code-level support team. They checked the console output of the app and were able to confirm all the necessary store api calls were done in the right order, but provided no further actionable information other than to do storekit testing as described in https://developer.apple.com/documentation/xcode/setting_up_storekit_testing_in_xcode, which I believe is impossible to do without the ability to launch the app directly from xcode.
  • Amazon
  • googlebilling
  • googlepay
  • apple iosmoe
  • [X ] apple robovm

I suspect the error message comes when you want to purchase?

I had the same problem with the Testflight when the builds are fresh. When they are a bit older, it works. For me, it probably was some kind of App Store cache problem.

Thanks for the response - you're right and i cant believe i forgot that most important detail in my report. I'll update the initial post.

Do you remember how long it took for the builds to begin working? I just tested on a 11 day old testflight build (the one I sent to the app store review team) and i still encounter the issue.

Okay this isn't a gdx-pay issue. I just cloned https://github.com/maximbilan/iOS-Swift-In-App-Purchases-Sample and uploaded that as my app and it also faces the same issue. I'm starting to think either my macbook is somehow unable to produce working ipas, or the testflight users are glitched (including the app store review team accounts), or something ... Thanks!