SKProductsRequest委托方法从不被调用 [英] SKProductsRequest delegate methods are never called

查看:747
本文介绍了SKProductsRequest委托方法从不被调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个以前为我工作,但现在不再工作,我不知道为什么。我的应用程序中有应用内购买设置。我确认我有一套正确的产品标识符,与itunesconnect中相应的应用内购买项目相匹配。该电话会发送到Apple视图 [productRequest start] ,但是尽管将代理设置为自己,但是我从未收到回复。我缺少什么?

  NSLog(@productIdentifiersSet:%@,productIdentifiersSet); 
if([productIdentifiersSet count]){
SKProductsRequest * productRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiersSet];
[productRequest setDelegate:self];
[productRequest start];
}

.........

   - (void)productsRequest:(SKProductsRequest *)请求didReceiveResponse:(SKProductsResponse *)响应{
<从未调用>
}

- (void)requestDidFinish:(SKRequest *)request {
< never called>
}

- (void)请求:(SKRequest *)请求didFailWithError:(NSError *)错误{
<从未调用>
}


解决方案

同样的问题发生在我身上今天。早上我的代码正在工作,下午没有工作3-4个小时。我花了我所有的时间,尝试了许多事情。但是在一段时间之前,它开始工作了。我没有改变任何东西。



我想我们不能相信苹果服务器..


This used to work for me but is now not working anymore and I can't figure out why. I have in-app purchase setup in my app. I confirmed that I have a correct set of product identifiers, matched by corresponding in-app purchase items in itunesconnect. The call goes out to Apple view [productRequest start], but I never get a response back, despite setting the delegate to myself. What am I missing?

NSLog(@"productIdentifiersSet: %@", productIdentifiersSet);
if ([productIdentifiersSet count]) {
    SKProductsRequest *productRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiersSet];
    [productRequest setDelegate:self];
    [productRequest start];
}

………

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {
   <never called>
}

- (void)requestDidFinish:(SKRequest *)request {
    <never called>
}

- (void)request:(SKRequest *)request didFailWithError:(NSError *)error {
    <never called>
}

解决方案

The same problem happened to me today. In the morning my code was working, in the afternoon it didn't work for 3-4 hours. I spent all of my time and tried many things. But a little time before, it started working itself. I didn't change anything.

I suppose we can't trust apple servers about that..

这篇关于SKProductsRequest委托方法从不被调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆