- tags: Operating system
macOS
Links to this note
Emacs on Macos: Too Many Files Open
tags: Emacs, macOS source: Simon, Ben. “Gotcha: Emacs on Mac OS: Too Many Files Open.” Accessed April 18, 2023. https://www.blogbyben.com/2022/05/gotcha-emacs-on-mac-os-too-many-files.html. Add below code snippet to your init.el: (defun file-notify-rm-all-watches () "Remove all existing file notification watches from Emacs." (interactive) (maphash (lambda (key _value) (file-notify-rm-watch key)) file-notify-descriptors)) Then just execute M-x file-notify-rm-all-watches when you meet this problem next time.
macOS Cheatsheet
tags: Cheatsheet, macOS Retrieve Bundle ID osascript -e 'id of app "/usr/local/MacGPG2/libexec/pinentry-mac.app"' osascript -e 'id of app "Finder"'
error: is only available in macOS 10.15 or newer
tags: Flutter,GUI,macOS souce: https://github.com/flutter/flutter/issues/73122 To solve this problem we should specify MACOSX_DEPLOYMENT_TARGET: I would imagine that there is Apple documentation on managing build settings in Xcode, but I don’t have a link offhand. There’s no Flutter-specific documentation of the process, if that’s what you mean; it isn’t any different in a Flutter macOS application as it would be any other macOS application. If you don’t want to use Xcode, you can change MACOSX_DEPLOYMENT_TARGET directly in Runner....
macOS 签名 GDB
tags: GDB,macOS macOS 下通过 GDB 调试程序会出现: Unable to find Mach task port for process-id 1375: (os/kern) failure (0x5). (please check gdb is codesigned - see taskgated(8)) 需要通过 Keychain Access Application 创建证书: code-sign-cert 需要对 gdb 进行签名,首先创建 gdb-entitlement.xml : <?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>com.apple.security.cs.debugger</key> <true/> </dict> 运行签名 codesign --entitlements gdb-entitlement.xml -fs code-sign-cert $(which gdb) See also: PermissionsDarwin。
macOS 问题解决三板斧
tags: macOS,macOS Cheatsheet 通常你沟通苹果的官方支持一般都会给你三板斧: 重启:按住电源键 10 秒中,然后等几秒钟后再开机 重置 SMC:关机然后按住:Ctrl + Option + 右侧Shift + 电源键 7 秒钟关机,等待几秒钟后开机。
macOS TimeMachine 日志
tags: macOS 查看 TimeMachine 日志: printf '\e[3J' && log show --predicate 'subsystem == "com.apple.TimeMachine"' --debug --last 6m
macOS max open files
tags: macOS fix “Too many open files in system” error