I'm using Swift to verify receipts in myObjective C Mac Application using the following code:
@objc
class MyAppTransaction: NSObject{
@objc
class func checkReceipt() async -> String {
do {
let verificationResult = try await AppTransaction.shared
switch verificationResult {
case .verified(_):
return "VERIFIED"
case .unverified(_, _):
return "NO RECEIPT"
}
} catch {
return "ERROR" //(StoreKit.StoreKitError) unknown
}
}
}
Starting today with my upgrade to Sequoia 15.4 and XCode 16.3 receipt validation is broken. The function is going to the catch and returning "ERROR" I can't set a break point in the do {} but if I set one at the return "ERROR", in the debugger error = (StoreKit.StoreKitError) unknown. the Compiler logs an error:Failed to parse AppTransaction: missingValue(for: [StoreKit.AppTransaction.Key.appTransactionID], expected: StoreKit.BackingValue). Reading the developer documentation I can't find anything about these struct members.
I tried to use refresh() to get a receipt like I used to with exit(173) but the compiler says refresh () not found.
This is extremely troubling because I can't debug my receipt validation code and I don't know if this will happen to my users.
Do I just have to trust Apple that my users will have an application with a receipt attached?
What can I do?