iOS-on-macOS app receipt not saved in recent macOS versions

Dear All,

My iOS app used to work OK on macOS, but since a macOS update in-app purchases have stopped working. It seems that the storekitagent process is no longer able to save the receipt to the filesystem. Here is what I see in the system log after I do a "refresh receipt":

default	22:03:47.822657+0100	storekitagent	[58C16E76_SK1] Writing receipt (83905 bytes) to file:///Users/phil/Library/Containers/0407ACA7-9EE2-4E32-AA3E-101A1B38EE70/Data/StoreKit/sandboxReceipt

error	22:03:47.823539+0100	kernel	Sandbox: storekitagent(1382) deny(1) file-write-unlink /Users/phil/Library/Containers/0407ACA7-9EE2-4E32-AA3E-101A1B38EE70/Data/StoreKit/sandboxReceipt

error	22:03:47.824306+0100	storekitagent	[58C16E76_SK1] Error writing receipt (83905 bytes) to file:///Users/phil/Library/Containers/0407ACA7-9EE2-4E32-AA3E-101A1B38EE70/Data/StoreKit/sandboxReceipt: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “sandboxReceipt” in the folder “StoreKit”." UserInfo={NSFilePath=/Users/phil/Library/Containers/0407ACA7-9EE2-4E32-AA3E-101A1B38EE70/Data/StoreKit/sandboxReceipt, NSUnderlyingError=0x145c19f80 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}

Note that is a sandboxReceipt on my development system, but I have a report from a user who seems to be suffering the same problem with the app store version of the app.

Is anyone else seeing this?

Is there a "quick hack" I can do to grant the storekitagent process permission to write to that folder?

FB12203478

The status of my bug report is now "Potential fix identified - For a future OS update". I guess that is an acknowledgement that it is a macOS bug, not something I'm doing wrong! Hopefully it will be resolved in a 13.x update and my users won't have to wait for macOS 14 to be released.

This does seem to be resolved in the macOS 14 beta.

iOS-on-macOS app receipt not saved in recent macOS versions
 
 
Q