I use in my app a section with app purchse but when I test it I have a problem and this is my result in console:
response for request product data
2011-09-26 19:14:37.601 MyApp[1233:707] Feature: puzzle, Cost: 0.790000, ID: com.mycompany.MyApp.puzzle
2011-09-26 19:14:44.973 MyApp[1233:707] Review request cannot be checked now: (null)
2011-09-26 19:14:44.980 MyApp[1233:707] making paymentQueue updatedTransactions
2011-09-26 19:14:46.095 MyApp[1233:707] making paymentQueue updatedTransactions
2011-09-26 19:14:46.098 MyApp[1233:707] FAILED!!! 4B2D3ECB-784D-415E-B3EA-942D88BD5A23
practically when I start my app and push on in app purchase button I have an alert w开发者_高级运维ith "Impossible to connect to apple store" and this result in console. What's the problem?
the code where I have the problem is:
- (void) buyFeature:(NSString*) featureId
onComplete:(void (^)(NSString*)) completionBlock
onCancelled:(void (^)(void)) cancelBlock
{
self.onTransactionCompleted = completionBlock;
self.onTransactionCancelled = cancelBlock;
[MKSKProduct verifyProductForReviewAccess:featureId
onComplete:^(NSNumber * isAllowed)
{
if([isAllowed boolValue])
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Review request approved", @"")
message:NSLocalizedString(@"You can use this feature for reviewing the app.", @"")
delegate:self
cancelButtonTitle:NSLocalizedString(@"Dismiss", @"")
otherButtonTitles:nil];
[alert show];
[alert release];
if(self.onTransactionCompleted)
self.onTransactionCompleted(featureId);
}
else
{
[self addToQueue:featureId];
}
}
onError:^(NSError* error)
{
NSLog(@"Review request cannot be checked now: %@", [error description]);
[self addToQueue:featureId];
}];
}
精彩评论