In order to address StoreKit's unhandled error "Payment Sheet Failed" when performing simulator in-app purchase testing, follow this solution.
Table of Contents:
When performing simulator in-app purchase testing from Xcode, the purchase flow is canceled before the purchase sheet pops up in the simulator. Then, the macOS crash reporter pops up and indicates a crash in a service called PassbookServiceUI!
Here’s what it looks like:
In addition, if you inspect the error responses from StoreKit you’ll see messages like this:
SKPaymentQueue: Payment completed with error: Error Domain=ASDErrorDomain Code=907 "Unhandled exception" UserInfo={NSUnderlyingError=0x60000009e5b0 {Error Domain=AMSErrorDomain Code=6 "Payment Sheet Failed" UserInfo={NSLocalizedDescription=Payment Sheet Failed,
The crash is in a service called PassbookServiceUI, which sounds like it has nothing to do with in-app purchases. Unfortunately, it makes it impossible to perform Xcode StoreKit purchase testing.
This occurs when triggering purchases with either StoreKit 1 or StoreKit 2 APIs. It happens even if a valid StoreKit Configuration file (.storekit) file is assigned to the build target.
The PassbookServiceUI crash occurs with the following environment as of this writing:
This error can be resolved by altering the simulator device, as many are known to function correctly.
That’s it! While this is an annoying bug that hopefully Apple fixes in a future version of Xcode, the workaround is quite simple.
👉Read more: App Store Error ITMS-9000 Invalid Binary Fix
Nami is a complete solution for growing your app revenue. Here’s what we have to offer:
Now you can focus on building a great app experience that is built for generating revenue. Get started for free here.
if(window.strchfSettings === undefined) window.strchfSettings = {};
window.strchfSettings.stats = {url: "https://nami.storychief.io/en/storekit-payment-sheet-failed-passbookserviceui-crash?id=1014477801&type=26",title: "[SOLVED] PassbookServiceUI crashes (Payment Sheet Failed) when performing simulator StoreKit in-app purchase testing",id: "51b60849-ff21-4408-b48f-9543da3cae59"};
(function(d, s, id) {
var js, sjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {window.strchf.update(); return;}
js = d.createElement(s); js.id = id;
js.src = "https://d37oebn0w9ir6a.cloudfront.net/scripts/v0/strchf.js";
js.async = true;
sjs.parentNode.insertBefore(js, sjs);
}(document, 'script', 'storychief-jssdk'))
👉Read more: SKError Code Unknown SKError Cases