Error SKStoreProductViewController ITMLKITErrorDomain 101

In my application, I show more applications with SKStoreProductViewController, but the Apple Store Verification team rejects it for a reason:

"When you click on the button for additional applications, an error message appears.

Everything works fine when I test it on my devices.

Below is a screenshot that Apple sent me, what could be the problem?

error

Code example:

__weak typeof(self) weakSelf = self; SKStoreProductViewController* vc = [[SKStoreProductViewController alloc] init]; vc.delegate = self; [vc loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier : @1000000000} completionBlock:^(BOOL result, NSError * _Nullable error) { if(result==NO){ //handle failure return; } [weakSelf presentViewController:vc animated:YES completion:nil]; }]; 
+7
ios objective-c storekit
source share
4 answers

ITMLKitErrorDomain often occur when the SKStoreProductViewController tries to call loadProductWithParameters with invalid parameters. An example of a complete error:

 <Warning>: [SKStoreProductViewController]: Did fail with error: Error Domain=ITMLKitErrorDomain Code=101 "The operation couldn't be completed. (ITMLKitErrorDomain error 101.)" UserInfo={ ... } {ITMLKitErrorHTTPStatus=400} 

Make sure you don't have typos or unexpected keys in the parameters dictionary when calling loadProductWithParameters . Verify that the key values, such as SKStoreProductParameterITunesItemIdentifier and SKStoreProductParameterAffiliateToken .

+2
source share

If you don’t experience this problem on test devices, just submit it for re-viewing, it may be a temporary problem with the itunes website (it is used to display these β€œmore apps”, right?). There are several references to this problem over the Internet without any solution.

+1
source share

While researching the question youre we can conclude that this is a rather rare case, which may be associated with the wrong product identifier in the case of SkProductViewController . You should also check if you want to show one application or the number of them. Because Apple has an error related to showing multiple items.

I am using SKStoreProductViewController this way. This is the code that shows the application on the App Store:

 SKStoreProductViewController *storeProductViewController = [[SKStoreProductViewController alloc] init]; [storeProductViewController setDelegate:self]; [storeProductViewController loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier : @"xxxxx"} completionBlock:^(BOOL result, NSError *error) { if (error) { NSLog(@"Error %@ with User Info %@.", error, [error userInfo]); } else { [self presentViewController:storeProductViewController animated:YES completion:nil]; } }]; 

Then I use the delegate SKStoreProductViewControllerDelegate as follows:

 - (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController { [self dismissViewControllerAnimated:YES completion:nil]; } 

I also use [button setExclusiveTouch:YES]; , because customers click several product buttons several times. Also check that you are id if it is a separate product.

+1
source share

I just finished looking at the same problem. Everything works fine when testing the application, but the App Review team rejected my application to show a warning view with the error returned by calling loadProductWithParameters .

I worked on the issue by running the App Store in Safari if the call to loadProductWithParameters fails. This provides a useful supply in rare cases when the SKStoreProductViewController not working.

 SKStoreProductViewController *vc = [[SKStoreProductViewController alloc] init]; vc.delegate = self; NSDictionary *parameters = @{ SKStoreProductParameterITunesItemIdentifier : someAppId }; [vc loadProductWithParameters:parameters completionBlock:^(BOOL result, NSError *error) { if (result) { [someController presentViewController:vc animated:YES completion:nil]; } else { NSURL *appURL = [NSURL URLWithString:[NSString stringWithFormat:@"https://itunes.apple.com/app/id%@?mt=8", someAppId]]; if ([[UIApplication sharedApplication] canOpenURL:appURL]) { [[UIApplication sharedApplication] openURL:appURL]; } else { // display the error in an alert } } }]; 
0
source share

All Articles