Post

Replies

Boosts

Views

Activity

Disable "Adaptive Wake".
I would like to know how to disable adaptive wake, without disabling PowerNap. 2022-03-10 08:49:48.620 Df powerd[107:779c9e] [powerd:assertions] Process powerd.107 Summary MaintenanceWake "Prevent sleep for expected user activity" age:00:00:53 id:55834613872 [System: SRPrevSleep kCPU] I dislike the fact that the computer will wake up before I come to it and will STAY awake, for hours. During the blackout of Taiwan last week, the battery was completely drained when I went to use the laptop and with no power, I was forced to wait until the power came back before I could access the laptop.
0
0
966
Mar ’22
Detect and pause any music
I'd like to know how to detect if an application is playing music (I guess audio) and pause it while my app does something and then resume it once it's done. It seems like I should be able to do that with "Now Playing" or "Media Player", but these appear to be iOS libraries and not fleshed out for the Mac (or I am misunderstanding the documentation). Control Center appears to be unscriptable, while a user can control Media via the Shortcuts app, it seems like a 3rd Party app can't embed and execute a shortcut.
0
1
2.4k
Mar ’22
Enumerating HID devices triggers "Input Monitoring" alert.
Using IOHIDManagerCopyDevices to get a list of keyboards and mice attached to Mac, triggers the user facing "Input Monitoring" request. Because I'm NOT monitoring the users input, the result of the user selection makes no difference to the result, but the privacy warning dialog makes my app look suspicious. All it is doing is checking to make sure that the customer has a non-Bluetooth keyboard or mouse, before they click the button to disable Bluetooth. Is there a way a safe way (no private API please) to enumerate HID devices without this warning, or should I file a feedback asking Apple to reconsider what triggers this dialog?
0
0
800
Aug ’23
SwiftUI on Mac, Deficiencies with Text Editing
SwiftUI on macOS does so many things in way that I really love it, but it feels like I've run into an area that no-one at Apple seems to care about. Text Editing In order to get a TextEditor that could use the built-in Spelling & Grammar checking (without enabling Autocorrect), I had to host a NSTextView, which was an interesting experience for someone with only a few months of SwiftUI experience. The default menu items "TextEditingCommands()" don't reflect the fields settings. The menu items do change the settings, but consistently show all the options as being unsellected. I'd like to know if there's a secret sauce I'm missing that would enable these menuitems to reflect the settings of the focused field, or if like the TextEditor, these items need to be recreated and replaced to work as expected. I understand that saving and reloading the settings per field is up to the individual developer, but it would be great if there is an over writable template that could handle this by default.
0
0
464
Jan ’24