Reputation: 9156
When you present a SKStoreProductViewController in your app, with bad network conditions or in airplane mode, the modal view is not presented (because of course it can retrieve the data from the appstore), and there is no error handling method in the delegate.
So what's the proper way to handle network errors or no network in this situation?
Upvotes: 1
Views: 687
Reputation: 9156
Silly me, there's just a completion block you can use for this.
[storeViewController loadProductWithParameters:parameters
completionBlock:^(BOOL result, NSError *error) {
if (result) {
[appDelegate.window.rootViewController presentViewController:storeViewController animated:YES completion:nil];
} else {
//error message
}
}];
Upvotes: 1