开发者

SKProductsRequestDelegate failure

开发者 https://www.devze.com 2023-01-11 15:34 出处:网络
The SKProductsRequestDelegate has one single method: - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response

The SKProductsRequestDelegate has one single method:

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response

Usually, I find these sorts of delegates will have several methods for handling multiple cases, rather than just success. For example:

-(void) connection:(NSURLConnection *)connection didFailWithError:(NSError *) e开发者_Go百科rror

How can I check if this code fails for some reason, eg. the user is offline?

SKProductsRequest *productsRequest = [[SKProductsRequest alloc] ... ];
productsRequest.delegate = self;
[productsRequest start];


SKProductsRequestDelegate conforms to the SKRequestDelegate protocol.

There you find

- (void)request:(SKRequest *)request didFailWithError:(NSError *)error
- (void)requestDidFinish:(SKRequest *)request
0

精彩评论

暂无评论...
验证码 换一张
取 消