Hello!
I found that on the latest macOS 13 Ventura, my iOS app (iOS-App-On-Mac-With-M1/M2-Chip) is not able to restore IAP purchases or refresh receipt anymore.
When using SKReceiptRefreshRequest()
to refresh the IAP receipt, I got following error.
Error Domain=SKErrorDomain
Code=0 "An unknown error occurred"
UserInfo={
NSLocalizedDescription=An unknown error occurred,
NSUnderlyingError=0x1330c1840 {
Error Domain=ASDErrorDomain Code=500 "(null)" UserInfo={
NSUnderlyingError=0x13338ebf0 {
Error Domain=NSCocoaErrorDomain
Code=513 "You don’t have permission to save the file “receipt” in the folder “StoreKit”." UserInfo={
NSFilePath=/Users/***/Library/Containers/EC7E888F-3388-418A-92C5-9CBDDC4A1846/Data/StoreKit/receipt,
NSUnderlyingError=0x13333a790 {
Error Domain=NSPOSIXErrorDomain
Code=1 "Operation not permitted"
}
}
}
}
}
}
It seems that the receipt cannot be refreshed due to a file permission issue.
Also, the SKPaymentQueue.default().restoreCompletedTransactions()
function does not get the purchases properly (but also does not report an error).
This issue only appears in my iOS app on macOS 13 Ventura.