macOS is the operating system for Mac.

Posts under macOS tag

200 Posts

Post

Replies

Boosts

Views

Activity

macOS 15.4 Beta (24E5222f) Killed My External Displays – Send Help (or an Exorcist)
For 9 Glorious Months, My MacBook Pro & J5 Create JCD543 HUB Were Best Friends… Until I Updated macOS For nearly a year, my MacBook Pro 14” (2023, M2 Pro, 16GB RAM) worked flawlessly with my J5 Create JCD543 HUB, allowing me to run: ✅ 4 External Displays (Samsung, LG, Insignia, Samsung) A setup that worked perfectly… until I updated macOS. Then Came the Update… and the Issues Began First, I updated last week. Two of my four displays stopped working. No big deal, I thought—I’ve dealt with display quirks before. Then, like an optimist ignoring red flags, I updated again last night to 15.4 Beta (24E5222f) and… well, now things are completely broken. My Once-Perfect Setup (Now a Display Disaster) JCD543 HUB → 2 HDMI displays (not working) JUD380 HUB → 1 HDMI display (partially working, unstable) MacBook HDMI port → 1 HDMI display (working, but feeling abandoned) JCA365 USB-C to Dual HDMI Adapter (Not part of my setup, but tested—also not working) What I’ve Tried (aka My Troubleshooting Journey) ✔ Restarted my Mac multiple times ✔ Uninstalled and reinstalled J5 drivers ✔ Swapped cables, unplugged/replugged everything, tested known-working HDMI cables (they work fine on other devices) ✔ Deleted /Library/Preferences/com.apple.windowserver.displays.plist (this fixed a similar issue in the past, but the file no longer exists in this update) The Likely Culprit? It seems to be a J5 driver issue triggered by the macOS update—and I’m not alone. Others are reporting similar problems. Apple… Any Fixes? I just want my four screens back. The setup worked flawlessly for 9 months, so it’s hard to believe it was never meant to work. If anyone has a workaround, I’m open to testing any solution—whether it’s a driver update, system tweak, or hidden macOS setting that might bring my displays back to life. Any advice would be greatly appreciated! Thanks in advance. (P.S. Apple, if you’re reading this—please look into this issue!)
0
0
477
Mar ’25
SwiftUI List on maCOS: highlighting content in the selected row?
Hello all, In a SwiftUI List, when a row is selected, a blue selection is drawn in the selection, and foreground Text with the default primary color is automatically made white. For other views with custom colors, I'd like to be able to make sure they become tinted white to match the system apps. For example, see the blue dot on the selected row: Example code: List(selection: $selection) {     ForEach(0..<4) { index in         HStack {             Image(systemName: "circle.fill")                 .foregroundColor(.blue)             Text("Test")         }         .tag(index)     } } With NSTableCellView, there is the backgroundStyle property. I've searched all of the available environment variables, and couldn't find anything appropriate. I have also tried manually including an isSelected binding on a view for each row, but the selection binding is not updated by List until mouse-up, while the highlight is updated on mouse-down and drag, so this results in a flickery appearance and is not right either. Any tips on how to achieve the correct result here? Thanks! 🙏
5
2
5k
Mar ’25
Content filter stuck waiting for user
When our content filter is deployed, some customers report issues which show that the content filter activation was performed but the filter is showing the state [activated waiting for user]. This typically happens if the customer isn't deploying a profile to pre-authorise the system extension. The customers report that there was no popup shown for them to allow the filter to complete activation. Once the filter is in this state, there doesn't seem to be a way to clear it without resorting to disabling SIP. Attempting a deactivation does not work, the filter remains in the same state. Is there a way we can we resolve this "stuck" state when it happens without disabling SIP?
2
0
335
Mar ’25
Detecting DarkWake and Maintainance Sleep transitions
On a macOS machine running v15.0, I have a daemon run by launchd which subscribes to the sleep and wakeup notifications using the IORegisterForSystemPower method. void PowerCallBack(void* refCon, io_service_t service, natural_t messageType, void* messageArgument) { switch (messageType) { case kIOMessageSystemWillSleep: logger->Debug("Received sleep notification from macOS"); if (refCon) { //Handle Sleep } IOAllowPowerChange(root_port, (long)messageArgument); break; case kIOMessageSystemHasPoweredOn: logger->Debug("Received wakeup notification from macOS"); if (refCon) { // Handle Wakeup } break; default: break; } } void MacOSNotification::RegisterNotifications() { logger->Debug("Registering for notifications from macOS"); powerNotificationThread = [[NSThread alloc] initWithBlock:^{ // Notifier object, used to deregister later root_port = IORegisterForSystemPower(this, &notifyPortRef, PowerCallBack, &notifierObject); if (root_port == 0) { return; } logger->Debug("Registered for system power notifications from macOS"); // Add the notification port to the application runloop CFRunLoopAddSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(notifyPortRef), kCFRunLoopCommonModes); CFRunLoopRun(); }]; //END OF THREAD BLOCK [powerNotificationThread start]; } Using this mechanism, I am getting notifications for normal sleep and wakeup transitions like closing and opening the lid. I need these notifications to terminate/reconnect my connection to a cloud service when we go to sleep/wakeup respectively. I have noticed from the power logs at /private/var/log/powermanagement that the after the sleep initiated by lid closing or clicking sleep in the top apple menu (both of which I can detect as they generate power notification), the macOS machine wakes up with the following message from powerd logs: DarkWake from Deep Idle [CDNP] : due to SMC.OutboxNotEmpty smc.70070000 wifibt/ I do not get any notification for this wakeup and my application threads start running. This happens every 15 to 16 mins from my observation. After this DarkWake, we go back to 'Maintenance' sleep in under a minute as can be seen by the following powerd log: Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active I do not get any notifications for this either. Is there a way to track and get notified of these DarkWake -> Maintenance sleep cycles? At the very least I would like to log when we go into and come out of these states. Currently I just rely on seeing a 15 min window of no logs to know this must have a DarkWake -> Maintenance sleep cycle. Also is there a way to make sure my application and its threads are not woken up by DarkWake (like an opt-out)? I would like to make it so that my application only runs when we are properly sleeping and waking.
5
0
1.1k
Mar ’25
My iOS game is compatible with visionOS and MacOS
I already have an opinion ( I should never release to a platform without testing on a physical platform device ) on this but wanted to learn from experience and expertise and see if there were any viable options. My hybrid casual puzzle game is released on the App Store for iOS. (Whew!) Apparently it is compatible to both Mac OS and VisionOS I would love to make it available everywhere however, I am not sure it is best to do so without testing on these physical devices. Which could also mean making the design adjustments for those devices, having test devices ready etc. and I would have to update my Laptop to silicon. Has anyone tried this without testing on physical devices? What are your thoughts/best suggestions? Thanks in advance!
2
0
373
Mar ’25
Wifi and Power option while developing Mac OS X Authorisation Plugin.
Hi, I am working on Authorisation Plugin for Mac OS X and able to get going for most of the parts and taking inspiration from Jamf Authorisation Plugin repo https://github.com/jamf/NoMADLogin-AD. I have seen in project they are implementing logic for following. Connecting to Wifi Power management (Sleep, Restart, Power Off) Question: I was wondering these things need to be implemented or is there a way some components from Mac OS X could be integrated calling some API and I don't have to implement them and I see say a top bar where these items are viable as we see in default login screen. I have developed my own login screen and I do see it is all blank everything I have to implement from scratch. Trying luck here if any API is out there to reduce work, else no option but to implement all logic. I'll really appreciate if someone just could help me know such API's are present or not. In case there are will save lot of effort. Thanks,
8
0
398
Mar ’25
Mounting an external disk from a sandboxed app
I’m attempting to make an app that uses Disk Arbitration to intercept a disk mount (by creating and returning a dissenter in the appropriate callback) and then mount the disk with certain options (specifically, read-only, nobrowse, or both, depending on user options). For example: DADiskMountWithArguments(disk, nil, DADiskMountOptions(kDADiskMountOptionDefault), nil, nil, kReadOnly) …where kReadOnly is a pointer to an array only containing a “rdonly” CFString. While DADiskMountWithArguments seems to be usable in a sandboxed app for disk images, it doesn’t work when the disk is an external disk (e.g. connected via USB). I see lines like this in Console.app when this happens: Sandbox denied authorizing right 'system.volume.external.mount' by client '/path/to/exe' [17934] (engine 580) I’ve identified two workarounds that allow this to work in a sandbox, but both have their own problems: If a LaunchDaemon (even a sandboxed one, which is required for registration with SMAppService.daemon from the sandboxed app) does the call to DADiskMountWithArguments, it will succeed. But App Store policies don’t allow escalation to root. If I use the undocumented entitlement com.apple.security.temporary-exception.sbpl with a value of (allow authorization-right-obtain (right-name "system.volume.external.mount")), the mount works without escalation to root. But I understand that App Review is likely to reject the use of this entitlement, and that this entitlement isn't supported to begin with. Specifically, these are the behaviors I see on macOS Sequoia 15.3.1 and Xcode 16.2. Since I would like to try to publish this app on the App Store, neither of these seem like acceptable solutions. I don’t see why this should be restricted if the sandboxed app is not declaring a special path (i.e. the path in DADiskMountWithArguments is set to nil) and still does not have access to the mounted filesystem - am I missing something/is there a way to accomplish this?
3
0
406
Mar ’25
macOS API for hardware model name?
If I go to "System Settings" -> "General" -> "About", it says "MacBook Air" and below that "M2, 2022" How can I get these strings programatically? The following C code gets me #include <stdio.h> #include <sys/sysctl.h> int main() { static const unsigned namelen = 2; int name[namelen] = {CTL_HW, HW_PRODUCT}; char buffer[256]; size_t bufferSize = sizeof(buffer); if (0 != sysctl(name, namelen, buffer, &bufferSize, NULL, 0)) { perror("sysctl"); return 1; } printf("%s\n", buffer); } the string "Mac14,2", which is the hardware model identifier. But I want to get the user-friendly model name, e.g. "MacBook Air (13-inch, M2, 2022)". How can I do this?
13
1
1k
Mar ’25
Xcode 16 Crash While Validating (com.apple.root.default-qos)
Hello, We're attempting to validate our application archive through Xcode but the application is crashing during the validate step and we're not sure why. Platform: macOS 15.1 Arch: arm64 We've confirmed that our developer agreements are up to date (a suggestion made by other posts on these forums). Other suggestions have been to downgrade Xcode but we're hoping there's another explanation. The application is quite complex - many libraries and framework - but executes as expected during development and testing. Crash Report Any insight into this error would be appreciated. We're sure it's something wrong with our plist or archive structure but the crash is limiting our ability to debug.
5
0
402
Mar ’25
Share extension activation rule for selected text on macOS
I have a share extension in my app, that shall allow users to send CSV files, custom app files, and selected text to my app via the share sheet for importing that data. So, the share extension should activate when the user has selected either: CSV or plain text files Custom UTI app files Text selected in other apps The supported file types have been defined in as a predicate query according to the example in the docs This works all fine on iOS, and the file sharing also works on the Mac. However, on macOS, my app is not shown as a target in the share sheet when the user selects text in other apps and tries to share that text via the context menu. Does macOS need a different configuration to enable a share extension for selected text? This is how my Info.plist of the Mac share extension looks like: ... <plist version="1.0"> <dict> <key>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict> <key>NSExtensionActivationRule</key> <string>SUBQUERY ( extensionItems, $extensionItem, SUBQUERY ( $extensionItem.attachments, $attachment, ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.plain-text" || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.myCompany.myApp.customFormat" || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.delimited-values-text" ).@count == $extensionItem.attachments.@count ).@count &gt;= 1</string> </dict> ... </dict> </plist> I know there is a NSExtensionActivationSupportsText but it seems this cannot be combined with a subquery rule. Is there a way to explicitly enable text activation within the subquery rule?
2
1
541
Mar ’25
Error Domain=com.apple.wifi.apple80211API.error Code=-528342014 "tmpErr"
On my macOS 15.x device, frequently encountering the error: Error Domain=com.apple.wifi.apple80211API.error Code=-528342014 "tmpErr" when connecting to an EAP WiFi network using CWWiFiClient. Restarting the device temporarily resolves the issue, but it reoccurs after some time. What could be causing this, and how can it be resolved programmatically?
1
0
391
Mar ’25
Not Sandbox App, Working on SMAppService as root
I am currently developing a No-Sandbox application. What I want to achieve is to use AuthorizationCopyRights in a No-Sandbox application to elevate to root, then register SMAppService.daemon after elevation, and finally call the registered daemon from within the No-Sandbox application. Implementation Details Here is the Plist that I am registering with SMAppService: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.example.agent</string> <key>BundleProgram</key> <string>/usr/local/bin/test</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/test</string> <string>login</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> Code that successfully performs privilege escalation (a helper tool popup appears) private func registerSMAppServiceDaemon() -> Bool { let service = SMAppService.daemon(plistName: "com.example.plist") do { try service.register() print("Successfully registered \(service)") return true } catch { print("Unable to register \(error)") return false } } private func levelUpRoot() -> Bool { var authRef: AuthorizationRef? let status = AuthorizationCreate(nil, nil, [], &authRef) if status != errAuthorizationSuccess { return false } let rightName = kSMRightBlessPrivilegedHelper return rightName.withCString { cStringName -> Bool in var authItem = AuthorizationItem( name: cStringName, valueLength: 0, value: nil, flags: 0 ) return withUnsafeMutablePointer(to: &authItem) { authItemPointer -> Bool in var authRights = AuthorizationRights(count: 1, items: authItemPointer) let authFlags: AuthorizationFlags = [.interactionAllowed, .preAuthorize, .extendRights] let status = AuthorizationCopyRights(authRef!, &authRights, nil, authFlags, nil) if status == errAuthorizationSuccess { if !registerSMAppServiceDaemon() { return false } return true } return false } } } Error Details Unable to register Error Domain=SMAppServiceErrorDomain Code=1 "Operation not permitted" UserInfo={NSLocalizedFailureReason=Operation not permitted} The likely cause of this error is that /usr/local/bin/test is being bundled. However, based on my understanding, since this is a non-sandboxed application, the binary should be accessible as long as it is run as root. Trying post as mentioned in the response, placing the test binary under Contents/Resources/ allows SMAppService to successfully register it. However, executing the binary results in a different error. Here is the plist at that time. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.example.agent</string> <key>BundleProgram</key> <string>Contents/Resources/test</string> <key>ProgramArguments</key> <array> <string>Contents/Resources/test</string> <string>login</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> Here is the function at that time. private func executeBin() { let bundle = Bundle.main if let binaryPath = bundle.path(forResource: "test", ofType: nil) { print(binaryPath) let task = Process() task.executableURL = URL(fileURLWithPath: binaryPath) task.arguments = ["login"] let pipe = Pipe() task.standardOutput = pipe task.standardError = pipe do { try task.run() let outputData = pipe.fileHandleForReading.readDataToEndOfFile() if let output = String(data: outputData, encoding: .utf8) { print("Binary output: \(output)") } task.waitUntilExit() if task.terminationStatus == 0 { print("Binary executed successfully") } else { print("Binary execution failed with status: \(task.terminationStatus)") } } catch { print("Error executing binary: \(error)") } } else { print("Binary not found in the app bundle") } } Executed After Error Binary output: Binary execution failed with status: 5 Are there any other ways to execute a specific binary as root when using AuthorizationCopyRights? For example, by preparing a Helper Tool?
1
0
307
Mar ’25
Bundle A Command Line Tool With MacOS Sandbox App
Hello, I'm buiding a macos app where I bundled a command line tool (Python) with my app. I put the tool in ****.app/Contents/MacOS folder, but it seems like the tool can not execute/read/ access. I don't know if a sandbox app can access/create a folder inside ****.app/Contents folder??? If not where can I put the tool that can access from my macos app? Any idea would be appreciated!
2
0
369
Mar ’25
Worried that I downloaded malware from a disk image
Hi, I accidentally downloaded a disk image and tried to run it, I shortly realized that it is probably malware. I'm worried that there's malware on my computer but I'm unsure if Gatekeeper was able to block me from running the image. I believe I clicked "Open anyway" or something along those lines even after it said not to run it, so I'm pretty scared that it was able to run. I checked the logs for Gatekeeper, and I see that it says "Code did not match any currently allowed policy". Does this mean it blocked whatever disk image I mistakenly tried to run? Thank you so much for your answers, it will help me stop worrying. 2025-03-01 10:45:10.480495-0800 0x953f85 Default 0x0 301 0 syspolicyd: [com.apple.syspolicy.exec:default] Fast Gatekeeper overrides are: inactive 2025-03-01 10:45:14.308061-0800 0x95412e Default 0x0 301 0 syspolicyd: [com.apple.syspolicy.exec:default] Caller indicated a Gatekeeper override occurred: &lt;private&gt; 2025-03-01 10:45:14.314205-0800 0x95412c Default 0x0 39200 2 CoreServicesUIAgent: [com.apple.launchservices:uiagent] Cleared Gatekeeper rejection record sucessfully 2025-03-01 10:45:25.864198-0800 0x953f85 Error 0x0 301 0 syspolicyd: [com.apple.syspolicy.exec:default] Error Domain=GatekeeperPolicyScanError Code=-67018 "Code did not match any currently allowed policy" UserInfo={NSURL=&lt;private&gt;, NSLocalizedDescription=Code did not match any currently allowed policy} 2025-03-01 10:45:30.659323-0800 0x95430b Default 0x0 301 0 syspolicyd: [com.apple.syspolicy.exec:default] Adding Gatekeeper denial breadcrumb (direct): PST: (path: 5451bc9511ea5cc0), (team: (null)), (id: project-55554944375cf61a58343acb828244228823e532), (bundle_id: NOT_A_BUNDLE) 2025-03-01 10:45:30.662733-0800 0x95430b Error 0x0 301 0 syspolicyd: [com.apple.syspolicy.exec:default] Terminating process due to Gatekeeper rejection: 39389, &lt;private&gt; 2025-03-01 10:45:54.602124-0800 0x9545ed Default 0x0 301 0 syspolicyd: [com.apple.syspolicy.exec:default] Fast Gatekeeper overrides are: inactive 2025-03-01 10:46:35.578533-0800 0x9548b4 Default 0x0 301 0 syspolicyd: [com.apple.syspolicy.exec:default] Fast Gatekeeper overrides are: inactive 2025-03-01 10:46:37.719530-0800 0x9533cf Default 0x0 39200 2 CoreServicesUIAgent: [com.apple.launchservices:uiagent] Cleared Gatekeeper rejection record sucessfully
1
0
374
Mar ’25
MacOS: Spacing between NavigationLink-s in a sidebar with NavigationView.
How can I put one list item at the top and another one at the bottom, retaining the NavigationView functionality? Here is a simple app: struct ContentView: View { var body: some View { NavigationView { Sidebar() } } } struct Sidebar: View { @State private var isActive = true var body: some View { List { NavigationLink(isActive: $isActive) { HomeView() } label: { Text("Home") } NavigationLink { SettingsView() } label: { Text("Settings") } } } } struct HomeView: View { var body: some View { VStack {} .navigationTitle("Home") } } struct SettingsView: View { var body: some View { VStack {} .navigationTitle("Settings") } } Which looks like this: My initial though was to put a Spacer() between each NavigationLink, but it results in an unexpected view: What i can do: Place an empty VStack between each NavigationLink with a hard-coded height like this: VStack {}.frame(height: 275) Which looks like this: But it wouldn't work if a user would want to increase the height of a window. I could disable window resizing which is kind of fine, but not the most optimal. Another obvious option was to replace the List with a VStack, but with this approach the styling of the NavigationLink gets broken and it does not get highlighted when I click on it. It looks like this: P.S. I know that NavigationView is deprecated, but i want to support macOS 12.0.
1
0
310
Mar ’25
Using Google Maps in App to determine distance
So far, we have been using Google Maps to determine distance along a certain route for a MacOS app to register kilometers for a business administration app. But, this is no longer possible, as the login for google maps no longer works. I understand we would have to pay to continue using the Google Maps service as it was and we would have to make changes to the app. That would be ok, but I was just wondering does any developer on this forum have suggestions on how to resolve this issue? Or even maybe have suggestions, to make this work better than before. Three suggestions by chatgpt: use ANWB route planner using google maps, Pro6pp, or to useWisp.Software (something I haven't heard of before. Your suggestions and ideas are welcome. Also, if the Apple Developer team knows of a way how to do this in your app, your advice is more than welcome. Have a nice day!
2
0
324
Feb ’25
MacOS Scale to view
on iOS you can choose to scale to view to have the app resize the screen easily in the developer environment. Scale to view is however not easily done on MacOS using NS to solve on MacOS now. Is it possible for the Apple developer team to make this easier for the Developer, as I understand it is for iOS applications?
0
0
248
Feb ’25
ObjectBox store DB issue with sandbox in mac flutter app for production
I am working on Flutter MAC app. And using ObjectBox store DB for local data saving. When i am setting Sandbox - NO, It is working fine. But when i am setting Sandbox - YES for production MAC flutter app - It is giving error and getting black screen only Getting error- Error initializing ObjectBox store: StorageException: failed to create store: Could not open database environment; please check options and file system (1: Operation not permitted) (OBX_ERROR code 10199)
1
0
463
Feb ’25