Post

Replies

Boosts

Views

Activity

Comment on NSDocument disregards save panel!
I had to do this myself several times to isolate a macOS bug: duplicate the Xcode project, then start reducing the code and test if the issue still happens, and if it does, make a duplicate of the duplicate so that I can go back to it in case my next reduction solves the issue. Keep repeating until you have a tiny project that reproduces it. It may take several hours (even the whole day) and test your patience to the extreme, but sometimes there's no other way.
Topic: UI Frameworks SubTopic: AppKit Tags:
May ’25
Comment on Audit token provided by NEFilterDataProvider sometimes fails to provide code object with SecCodeCopyGuestWithAttributes
But then I created an empty Xcode project with the "App" template and created a main.swift file again with your code, and when running the built App/Contents/MacOS/app in the Terminal, I get the same error that I mentioned before: Error Domain=NSOSStatusErrorDomain Code=100001 "EPERM: Operation not permitted". Do I need to add special entitlements in order to make it work?
Oct ’23
Comment on Audit token provided by NEFilterDataProvider sometimes fails to provide code object with SecCodeCopyGuestWithAttributes
Hi Quinn, thanks a lot for your help. I created an empty Xcode project with the "Command Line Tool" template, pasted your code, and run the built executable in the Terminal. When passing the pids for all the trustd processes I see in Activity Monitor it always returns the expected path, /usr/libexec/trustd.
Oct ’23
Comment on Get executable path from audit token provided by NEFilterDataProvider
What may be interesting, and what I noticed for the first time, is that after keeping my app open for several hours and noticing all those apparently unsigned processes, it began listing some of those same names, but this time they were correctly signed: trustd, mobileassetd, nsurlsessiond. They all started being listed at the same time at a distance of a few seconds from each other, at 6:06:33 PM today.
Oct ’23
Comment on Get executable path from audit token provided by NEFilterDataProvider
Hi, sorry for my late answer. It seems that the developer forums started again not sending notifications for replies. That was indeed a copy-paste error. The original code is identical with the one I posted here except for return nil which really is return url.path. I also noticed another typo: I wrote "have a non-nil path" but of course it should be "have a nil path". I just checked again on macOS 14 and trustd is still insecure, along with wifivelocityd and fmfd.
Oct ’23
Comment on How to install macOS 14 Sonoma or 13 Ventura on an external partition
I tried reinstalling Ventura on my external partition from the recovery one and it seemed to prepare the installation just fine, but then it rebooted into my main Ventura partition. Selecting the newly created Ventura partition from the startup disks makes the indeterminate progress indicator spin for a couple seconds, then it disappears again and nothing happens, just like when installing Ventura with the dmg installer. In my case, installing Ventura or Sonoma seems impossible.
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’23
Comment on NSDocument disregards save panel!
I had to do this myself several times to isolate a macOS bug: duplicate the Xcode project, then start reducing the code and test if the issue still happens, and if it does, make a duplicate of the duplicate so that I can go back to it in case my next reduction solves the issue. Keep repeating until you have a tiny project that reproduces it. It may take several hours (even the whole day) and test your patience to the extreme, but sometimes there's no other way.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
May ’25
Comment on Creating file bookmarks doesn't work anymore on macOS 15 Sequoia
There are never more than 10 bookmarks active. I‘m also calling stopAccessingSecurityScopedResource. This only happens since macOS 15.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’24
Comment on How to link multiple text views to a single text storage in TextKit 2
Do you mean that I can't? Can the previous behaviour of having the same NSTextStorage appear in multiple NSTextView not be replicated?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’24
Comment on Audit token provided by NEFilterDataProvider sometimes fails to provide code object with SecCodeCopyGuestWithAttributes
But then I created an empty Xcode project with the "App" template and created a main.swift file again with your code, and when running the built App/Contents/MacOS/app in the Terminal, I get the same error that I mentioned before: Error Domain=NSOSStatusErrorDomain Code=100001 "EPERM: Operation not permitted". Do I need to add special entitlements in order to make it work?
Replies
Boosts
Views
Activity
Oct ’23
Comment on Audit token provided by NEFilterDataProvider sometimes fails to provide code object with SecCodeCopyGuestWithAttributes
Hi Quinn, thanks a lot for your help. I created an empty Xcode project with the "Command Line Tool" template, pasted your code, and run the built executable in the Terminal. When passing the pids for all the trustd processes I see in Activity Monitor it always returns the expected path, /usr/libexec/trustd.
Replies
Boosts
Views
Activity
Oct ’23
Comment on how to get the pid of NEFilterFlow in handleNewFlow of Network Extension?
How would it be possible to track the code identity with SecCodeCopyDesignatedRequirement? SecRequirement is only defined as a class implementing Hashable, so it cannot be stored and loaded again between app launches.
Replies
Boosts
Views
Activity
Oct ’23
Comment on how to get the pid of NEFilterFlow in handleNewFlow of Network Extension?
Isn't there a third possibility: that the code is generated by someone who is not an attacker?
Replies
Boosts
Views
Activity
Oct ’23
Comment on Get executable path from audit token provided by NEFilterDataProvider
What may be interesting, and what I noticed for the first time, is that after keeping my app open for several hours and noticing all those apparently unsigned processes, it began listing some of those same names, but this time they were correctly signed: trustd, mobileassetd, nsurlsessiond. They all started being listed at the same time at a distance of a few seconds from each other, at 6:06:33 PM today.
Replies
Boosts
Views
Activity
Oct ’23
Comment on Get executable path from audit token provided by NEFilterDataProvider
And counting: transparencyd, configd, captiveagent, locationd, rtcreportingd, mobileassetd, swcd, diagnosticextensionsd.
Replies
Boosts
Views
Activity
Oct ’23
Comment on Get executable path from audit token provided by NEFilterDataProvider
Other processes include rapportd, remoted, syspolicyd, timed, networkserviceproxy, nsurlsessiond.
Replies
Boosts
Views
Activity
Oct ’23
Comment on Get executable path from audit token provided by NEFilterDataProvider
What could be the specific context you're talking about that causes the code to fail?
Replies
Boosts
Views
Activity
Oct ’23
Comment on Get executable path from audit token provided by NEFilterDataProvider
Hi, sorry for my late answer. It seems that the developer forums started again not sending notifications for replies. That was indeed a copy-paste error. The original code is identical with the one I posted here except for return nil which really is return url.path. I also noticed another typo: I wrote "have a non-nil path" but of course it should be "have a nil path". I just checked again on macOS 14 and trustd is still insecure, along with wifivelocityd and fmfd.
Replies
Boosts
Views
Activity
Oct ’23
Comment on UISplitViewController displays button to change the display mode even when presentsWithGesture = false
Thanks, but what has the backAction got to do with the split view controller? The documentation says that if presentsWithGesture = false there will be no button for changing the display mode.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on Determinate spinning NSProgressIndicator doesn't adapt to frame size and gets cut off
Thanks, that's it. Since the indeterminate spinning one worked with every size, I assumed that this would be the right way to size the determinate one as well, but using controlSize effectively works for both.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on How to install macOS 14 Sonoma or 13 Ventura on an external partition
I tried reinstalling Ventura on my external partition from the recovery one and it seemed to prepare the installation just fine, but then it rebooted into my main Ventura partition. Selecting the newly created Ventura partition from the startup disks makes the indeterminate progress indicator spin for a couple seconds, then it disappears again and nothing happens, just like when installing Ventura with the dmg installer. In my case, installing Ventura or Sonoma seems impossible.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’23