0

我有一个速度计应用程序,其中 2 个功能通过将它们添加到应用内购买来启用。一切正常,我关注了http://www.raywenderlich.com/2797/introduction-to-in-app-purchases

要启用的两个功能都是非消耗性的。问题是,当我对此进行测试并添加测试帐户和密码时,我一直得到相同的警报视图 - “您已经购买了这个,但尚未下载。点击 OK 立即下载”

[环境:沙盒]

为什么我总是得到相同的警报视图?该功能只是启用HUD功能并删除广告;所以没有什么可以从服务器下载。而且我无法确定交易是否完成,因为它甚至没有调用完成交易方法,只是给出了相同的警报。

4

2 回答 2

1

我浏览了本教程并观察了这个警报视图。我认为这不是任何问题,因为您可能已经在应用商店设置了一个测试帐户。如果您已经购买了此商品,Apple 商店会通知您,如果您已经运行了您的应用程序并多次测试了购买功能,您可能会这样做。这实际上是苹果商店完成的部分,所以你对此没有任何处理。

You should received though after this alert a notification that the transaction has been completed. Make sure you have added this method:

 [[SKPaymentQueue defaultQueue] addTransactionObserver:[InAppRageIAPHelper sharedHelper]];

in your didFinishLaunchingWithOptions method of your app delegate

于 2012-08-16T09:06:06.577 回答
0

在购买商品时使用不同的产品 ID:

-(void)buyCoinPack_1
{
          SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObject:self.currentProductId_1]]; 

            request.delegate = self;  
            [request start]; 
}


-(void)buyCoinPack_2
{
          SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObject:self.currentProductId_2]]; 

            request.delegate = self;  
            [request start]; 
}
于 2012-08-16T08:51:48.043 回答