2012-10-30 38 views
2
- (void) requestProductData 
{ 
SKProductsRequest *request= [[SKProductsRequest alloc] 
initWithProductIdentifiers: [NSSet setWithObjects: @"com.mycompany.appname.item1", @"com.mycompany.appname.item2", nil]]; 
request.delegate = self; 
[request start]; 
} 

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse: 
    (SKProductsResponse *)response 
{ 
NSArray *myProducts = response.products; 
NSLog(@"%i Products retrieved", [myProducts count]); 

[request autorelease]; 
} 

正如你所看到的,我成立了的NSLog返回的產品數量。
我不斷收到檢索0個產品。
產品ID & &捆綁標識符匹配與iTunes連接。
In App Purchase的狀態是「準備提交」,應用狀態爲「準備要上傳」
有別的我應該設立在iTunes Connect?或與代碼的東西?未檢索的任何產品,在應用內購買

編輯:
是否有所作爲,我目前尚不具備的iOS付費應用有效合同?

回答

0

蘋果服務器沒有找到你的產品,你應該看到他們在response.invalidProductIdentifiers。很可能,您還沒有在iTunesConnect中創建它們,或者您可能有錯字。如果您的產品尚未獲得批准,則可能需要確保您位於沙箱中。

+0

他們'response.invalideProductIdentifiers' 我已經翻了一番檢查所有的拼寫。 我如何確保沙箱? – iamruskie

+0

如果您在xcode中使用編譯並運行,它應該以自動方式進行沙盒處理。 – Kevin

+0

是的,我也這麼認爲,我默認在沙箱中。 那麼問題是什麼? – iamruskie

相關問題