Post

Replies

Boosts

Views

Activity

Reply to How to test a Mac App on older versions of Mac OS X?
I asked the same exact thing in Feedback Assistant 4 years ago, and they told me that they have no plans on making old macOS installers available. Apparently they have no interest in allowing developers to support older macOS systems, which, assuming that their main interest is maximizing profit from Mac sales by pushing people to abandon old Macs that don't support the software they need anymore, totally makes sense.
Oct ’22
Reply to Getting clicked item index in NSPathControl with pathItems instead of pathComponentCells
The documentation in the header file for NSPathControlItem also states: "NSPathControlItem should not be subclassed." I tried doing so nonetheless, but sender.clickedPathItem as! MyPathControlItem fails with the error Could not cast value of type 'NSPathControlItem' (0x20ae78870) to 'MyPathControlItem' (0x1005c0688). So it seems like any custom subclass is replaced again with NSPathControlItem.
Topic: UI Frameworks SubTopic: AppKit Tags:
Feb ’23
Reply to Getting clicked item index in NSPathControl with pathItems instead of pathComponentCells
Find below my sample code that shows how it's impossible to associate any custom data with a path item. PathControl.pathItems.didSet is called only once when explicitly setting them in loadView(), and in the action selectPath(_:) the path items are not of my custom subclass PathControlItem but are again NSPathControlItem. They change their address on every click, and finding the clicked path item in the pathItems array always returns nil even if by comparing the logged addresses it appears to be there. class ViewController: NSViewController { override func loadView() { let pathControl = PathControl() pathControl.action = #selector(selectPath(_:)) pathControl.pathItems = ["a", "b", "c"].map({ title in let item = PathControlItem() item.title = title item.customData = title return item }) view = NSStackView(views: [pathControl]) } @IBAction func selectPath(_ sender: NSPathControl) { print("click", sender.clickedPathItem!.description, (sender.clickedPathItem as? PathControlItem)?.customData, sender.pathItems.description, sender.pathItems.firstIndex(of: sender.clickedPathItem!), sender.pathItems.firstIndex(where: { $0.description == sender.clickedPathItem!.description })) } } class PathControl: NSPathControl { override var pathItems: [NSPathControlItem] { didSet { print("didSet", pathItems) } } } class PathControlItem: NSPathControlItem { var customData = "" }
Topic: UI Frameworks SubTopic: AppKit Tags:
Feb ’23
Reply to Appstore texts and screenshots localization not working
Could it be that you sent the wrong link for Slovak? It seems to be the same for Finnish. Otherwise it really seems like something's not working. Have you double-checked that selecting the respective language in App Store Connect shows the expected text? If that works as expected, I would use the Contact link at the bottom of the App Store Connect website and explain the issue.
Apr ’23
Reply to 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 ran 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. 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
Reply to Audit token provided by NEFilterDataProvider sometimes fails to provide code object with SecCodeCopyGuestWithAttributes
Yes, they are both sandboxed. Sorry if that wasn't clear. Even with sudo I still get the same error Error Domain=NSOSStatusErrorDomain Code=100001 "EPERM: Operation not permitted". It's only the processes in /usr/libexec, all others seem to work and return some path. I also don't see any sandbox violation reports in the Console. Even just searching for com.apple.sandbox.reporting doesn't show any results. The instructions given in the link you posted say that I should post 3 different lines in the Console search field, but in the screenshot it looks like pasting the string type:error should appear as a token with the text error, while I still see type:error. So I searched for error and manually changed the search scope to "Message type", but again no results.
Oct ’23
Reply to What's the advantage of applying settings with NEFilterDataProvider.apply(_:) over manually checking incoming network flows?
Thank you for your input. It sounds like you're saying that I can set up rules to specify what flows I get. But what I'm doing right now is specifying an empty set of rules NEFilterSettings(rules: [], defaultAction: .filterData) which allows my code to manually filter all flows, right? Why should I specify any custom NENetworkRule if I can manually inspect all flows anyway?
Oct ’23