SKStoreProductViewController does not work on iPad iOS 8

I am using SKStoreProductViewController on an iPad with iOS 8. Pressing a button opens its instance:

[self.storeProductViewController loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier:appStoreIdNumber} completionBlock:^(BOOL result, NSError *error) {...}]; [[self getPresentingViewController] presentViewController:self.storeProductViewController animated:YES completion:^{...}]; 

He appears for the first time. But after he is fired, pressing the button again to open it throws an exception, and the popup never appears.

 <SKRemoteProductViewController: 0x15c1ec00> timed out waiting for fence barrier from com.apple.ios.StoreKitUIService 

Does anyone know what is happening or how it works?

+5
source share
4 answers

I also had some other problems with UIAppearance and StoreKit that don't work together (see SKStoreProductViewController StoreKit, leaving space between the navigation bar and view? )

I had the same problem as you, and deleting all the UIAppearance code fixed it, but I noticed that SKStoreProductViewController would not load iPad applications on iPhone on iOS 8 and it would fail. Let me know if you have the same problem.

0
source

I had the same problem when the first time I introduce SKRemoteProductViewController, it works fine, but subsequent presentations give an error as described by OP. Apparently, the problem is related to the simultaneous presentation of the same SKRemoteProductViewController. If I remove SKRemoteProductViewController after it is presented and then reload another one every time I want it to be present again, everything works without problems.

0
source

There was this problem. Make sure the identifier is actually an NSString

 @{ SKStoreProductParameterITunesItemIdentifier : identifier } 

I inadvertently passed an NSURL object, which led to the same error - "timed to wait for the fence barrier from com.apple.ios.StoreKitUIService"

0
source

You must submit SKStoreProductViewController before downloading

0
source

Source: https://habr.com/ru/post/1203915/


All Articles