iPhone Store Kit “Cannot connect to iTunes Store”

前端 未结 26 2241
南旧
南旧 2020-11-27 13:09

I am working on adding In-App purchases to my app.

I am able to receive the productsRequest:didReceiveResponse method, and receive the array of products

26条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-27 13:59

    The In-App Purchase FAQ has this information:

    Cannot connect to iTunes Store

    The "Cannot connect to iTunes Store" issue may be due to one or more of the following reasons:

    • The sandbox may be unreachable.
    • Your app does not have a bundle version (CFBundleVersion). See Setting the Version Number and Build String for more information.
    • Your app is running in the Simulator, which does not support in-app purchase.
    • You are attempting to purchase a product that is unavailable for sale. See Query the App Store for product information before presenting your app’s store UI for more information.

    In my case, the error occurred because I was using the simulator.

    Even in the In-App Purchase Programming Guide says to use the development iOS device has a suggested testing step.

提交回复
热议问题