StoreKit to return all product IDs

后端 未结 3 1776
轻奢々
轻奢々 2021-02-20 04:16

This question is a little different from the others I\'ve found here. My In App StoreKit is working, I can list products in my store successfully. I\'ve gone through the Apple

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-20 04:53

    I have the same problem but I think I have a way to solve it by planning ahead with the product IDs. Instead of naming each product ID something special like "goldSponsor", just number them "1", "2", "3" ... for as many as you want to add. Set the name to "Gold Sponsor" and the description to whatever you want. When your app starts running, request the first N sequential product IDs. If they all are returned as valid, request another N product IDs until you get invalid IDs at which point you are done.

    I am planning to do this with Apple hosted content. I am also considering using the description field for the product to encode detailed information about the data I am downloading (in my case the corner coordinates of a map). I will still be using the full "com.company.product.1" for each ID and numbering them sequentially from there.

提交回复
热议问题