Reasons for SKProductsRequest returning 0 products?

后端 未结 14 2662
粉色の甜心
粉色の甜心 2020-12-25 09:28

I\'m trying to set up IAP but after making a call to retrieve the products using SKProductsRequest the SKProductsResponse array within my delegate has a count of 0. Here\'s

相关标签:
14条回答
  • 2020-12-25 10:19

    Let's go to iOS's Settings > iTunes & App Stores and Log out

    Hope this help you, I don't know why :D

    0 讨论(0)
  • 2020-12-25 10:19

    In my case that was a bug. In simulator all product identifiers fails and was marked as invalid. In real device all product request successfully fetched a product.

    TvOS 4K

    0 讨论(0)
  • 2020-12-25 10:21

    Make sure you have In-App Purchase turned on in the Capabilities section. If you don't, SKProductsRequest will return 0 products.

    0 讨论(0)
  • 2020-12-25 10:21

    After digging a lot, following steps solved my issue of getting 0 products for SKProductsRequest.

    Go to Settings > Sign in to your iPhone on your iOS device. If you're already logged in with your original Apple ID, tap on it and choose Sign Out. Then simply sign in with the credentials for the sandbox tester you created in iTunes Connect.

    0 讨论(0)
  • 2020-12-25 10:22

    I'm getting an empty SKProductsResponse.products array on some macOS 10.14 systems while others work just fine and return the valid list of current IAPs for my app.

    Same app, identical code.
    User logged into the same App Store account on both machines.

    That's just plain weird.

    0 讨论(0)
  • 2020-12-25 10:25

    I had the same issue...

    I simply change my bundle identifier which does not match with an iTunes bundle identifier.

    And my app runs well :)

    0 讨论(0)
提交回复
热议问题