log noise? : "NSPersistentUIDeleteItemAtFileURL blablabla"

Since the macOS 14.4 and Xcode 15.3 update, I'm getting these message posted in the Xcode log when I run a Mac app, even for template apps.

BOOL _NSPersistentUIDeleteItemAtFileURL(NSURL *const __strong) Failed to stat item: file:///Users/***/Library/Containers/***/Data/Library/Saved%20Application%20State/***.savedState/restorecount.plist

I've already reported this to Apple. I just wanted to know if I was the only one affected (it happens on all my development Macs).

Hi,

I'm also having this problem. Do you also have other "log noise" after upgrading to macOS 14.4 and Xcode 15.3? I detailed my experience here: [https://developer.apple.com/forums/thread/748133)

You are not alone. I moved my project from an iMac (2017-MacOS 13.6.6) platform, where everything worked as expected, because Apple will no longer update the OS. I moved to my laptop (M1 2020) with MacOS 14.4.1 running Xcode Version 15.3 (15E204a). My project is directed to MacOS minimum 12.4 using Xcode Project Format 13.0. With no changes (except the usual file errors that need correcting after moving a project to a different machine) I get your above mentioned message in my console output window in the editor.
With one additional snafu, I am having issues with the Store. SKPaymentQueue.default().restoreCompletedTransactions() is no longer directed into the Observer ( class StoreObserver : NSObject, SKPaymentTransactionObserver ). func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {
print("HELLO I AM READY TO PROCESS YOUR REQUEST FOR RESTORE!") .. more code ..

Oddly, this executes when the App loads and the Observer is created BUT, refuses to execute upon command instruction by the .restoreCompletedTransactions. Now, I know this little extra I added wasn't part of the original post but, I thought I'd share. Best of luck.

I'm seeing this issue, and the app window (I'm using XIB) is also not remembering where it was left.

I'm also having what may be a related problem: When building for "My Mac (designed for iPad)," Xcode does not overwrite previous builds. So you'll make a bunch of code changes and then re-run your app, only to see that your changes "didn't work." But that's because Xcode is still running the old code, wasting hours of your time.

Right now you have to add a "clean build directory" step to every project if you want to run on Mac.

I'm getting a bunch of error messages in the Xcode console, such as the one you mention here, along with:

AX Safe category class 'SFUnifiedBarRegistrationAccessibility' was not found!

CLIENT ERROR: TUINSRemoteViewController does not override -viewServiceDidTerminateWithError: and thus cannot react to catastrophic errors beyond logging them

I'm developing for iMac. The error shows up in the same place in my code every time I build. I've looked for something that might relate in my code and could never get to restoreount.plist. The message disappears after some delay and the app still runs. Still testing.

Additionally, I did some digging to find why my restoreCompletedTransactions() was no longer running after moving to the new platform: I implemented the Failure routine for calling restoreCompletedTransactions() ..func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: any Error) { print("RESTORE FAILED WITH ERROR:(error)") }.. and was returned an error; [Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSLocalizedDescription=] Funny thing is, this error only occurs using the new platform. I went back to my iMac OS 13.6.7 with Xcode 15.2 and my restoreCompletedTransactions() still runs perfectly.

the original post in this thread [BOOL _NSPersistentUIDeleteItemAtFileURL(NSURL *const __strong) Failed to]. blah blah Running MacOS 14.5 using Xcode 15.4 after /SavedApplicationState/ the new software combination is using /{bundleIdentifier}/ where the older version MacOS 13.x using Xcode 15.2 is using /{Target}/. Maybe something Apple can comment on?

Just noise. Enable metadata in the toggles of the console pane (bottom left). Then click the console filter textfield (bottom right), type StateRestoration, choose the not equal sign.

I have a few of those, the console filter has memory and you can re-enable them (press the widget on the left of the textfield). Not ideal I know.

Another option is to stream to console. Or to read OSLogStore on a loop and filter so you only read your own log.

Jeanlain, I’ve too meet the problem. I’m just beginning to develop on my mac and I try to follow the tutorials, so I’m not really sure of what I do but in complement of error xcode says « Failed to stat item: file:///Users/myname/Library/Containers/name.myname » but I havn't any Library directory and don’t what part of program should create it. Hope this help.

log noise? : "NSPersistentUIDeleteItemAtFileURL blablabla"
 
 
Q