I am using the following script to unregister my apps from the Launch Services. Thank you for your help, Quinn!
#!/bin/bash
# List of app names to unregister from Launch Services
names="Electron.app|MyApp.app"
# Function to unregister an app
unregister_app() {
local path="$1"
echo "Unregistering: $path"
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -u "$path"
}
# Run lsregister -dump and grep for specific apps, then process each line
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -dump | grep -E "$names" | while IFS= read -r line; do
# Extract the app path
path=$(echo "$line" | cut -c 6- | rev | cut -c 10- | rev | xargs)
# Check if path is not empty
if [ ! -z "$path" ]; then
unregister_app "$path"
fi
done
echo "Unregistration process completed."```
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags: