1

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?

4

1 回答 1

1

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

                                 }
}];
于 2013-02-21T11:17:33.427 回答