9

I've followed this tutorial to allow for my app to have builds for DEBUG, ADHOC testing (for my beta users), and RELEASE. Everything works great except for my in-app purchases.

My Bundle IDs after this setup are:

  • Debug: com.mycompany.myproduct.debug
  • Ad Hoc: com.mycompany.myproduct.adhoc
  • Release: com.mycompany.myproduct

(The RELEASE ID is the same as it was before this new setup.

Since this method changes the Bundle ID based on the build and since In-App Purchases are tied to a specific Bundle ID when I run my app as DEBUG or ADHOC my product identifiers come back as invalid when I call requestProductsWithCompletionHandler.

I have tried adding new In-App Purchase products prefaced with the new Bundle ID like so: com.mycompany.myproduct.debug.iapname, but since the In-App Purchases are tied to a single Bundle ID this doesn't work.

My question is this: In order to accomplish what I'm trying to accomplish, do I have to create 2 new apps in iTunes Connect for each of my new Bundle IDs and then add In-App Purchase products to each of those for each Build Configuration? Or, is there another way to accomplish what I'm trying to accomplish?

4

1 回答 1

2

答案是肯定的,因为商店工具包从 iTunes 商店获得应用内购买,最简单的方法是在 iTunes 连接中添加单独的应用程序并使其保持最新。

您可以采取的另一种方法是在您自己的类中从您的应用程序中抽象出商店工具包。然后,您可以检查产品的bundleIdentifier属性,如果您的产品是您所期望的,[NSBundle mainBundle]则可以从商店索取您的产品,或者如果仅用于测试目的,则返回您自己创建的模型。bundleIdentifierSKProducts

我想这取决于您对测试人员的承诺程度,但显然您的自定义类可以扩展为 n 个捆绑标识符,而 iTunes Connect 中的虚拟应用程序根本无法扩展

于 2014-02-06T19:12:55.230 回答