macOS-Defaults
macOS-Defaults copied to clipboard
Handoff (aka Continuity)
The one thing I've found is that you can at least see if it's supported on your Mac.
system_profiler SPBluetoothDataType | grep LMP (via LifeHacker)
I took the approch from here and simplified it.
uuid=$(/usr/sbin/system_profiler SPHardwareDataType | grep "Hardware UUID" | cut -c22-57)
defaults write ~/Library/Preferences/ByHost/com.apple.coreservices.useractivityd.$uuid.plist ActivityReceivingAllowed 0
defaults write ~/Library/Preferences/ByHost/com.apple.coreservices.useractivityd.$uuid.plist ActivityAdvertisingAllowed 0
However, the cut hack isn't really robust, we should find a more flexible solution.
A more robust solution, taken from here.
uuid=$(system_profiler SPHardwareDataType | awk '/UUID/ { print $3; }')