Enable AirDrop:
defaults write com.apple.sharingd DiscoverableMode "Everyone"
or
defaults write com.apple.sharingd DiscoverableMode "Contacts Only"
Disable AirDrop:
defaults write com.apple.sharingd DiscoverableMode "Off"
@anverhousseini Thanks very much, that worked
Hi @anverhousseini.
does the configuration of discoverableMode in domain com.apple.sharingd you presented in your answer effect merely airdrop , or also other applications that uses sharingd ?
I wish to disable airdrop for security reasons for all the clients in my organizations, but I don't want side effect with other apps that might use this feature..
thanks !
Hi @anverhousseini
is there anyway to apply this on iOS devices?
you can do it through a config profile for both iOS and macOS
Does anyone know how to disable AirDrop from the command line in Mojave? It seems like the com.apple.sharingd plist no longer exists. Thanks
Enable AirDrop:
defaults write com.apple.sharingd DiscoverableMode "Everyone"
or
defaults write com.apple.sharingd DiscoverableMode "Contacts Only"
Disable AirDrop:
defaults write com.apple.sharingd DiscoverableMode "Off"
@anverhousseini
can you clarify how I can add the below within jamf pro? is this within the configuration profile or is this a script? any help would be helpful!
defaults write com.apple.sharingd DiscoverableMode "Off"
How can one disable AirDrop in Mojave via the command line? It appears that com.apple.sharingd no longer exists.
x trench run
How can one disable AirDrop in Mojave via the command line? It appears that com.apple.sharingd no longer exists.
x trench run
To disable AirDrop in Mojave via the command line, follow these steps:
Open Terminal, located in the Utilities folder within the Applications folder.
Type the following command and press Enter:
bashCopy code
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.smbd.plist
Enter your administrator password when prompted.
This will stop the sharing of files via SMB, which includes AirDrop.
Note: Keep in mind that this will disable AirDrop for all users on the Mac. To enable it again, simply type the following command into the Terminal and press Enter:
bashCopy code
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.smbd.plist