Forked from dive/fix_ios_15_simulator_spotlight_cpu.sh
Created
October 31, 2022 14:04
-
-
Save meftunca/ceceed6317a4b263d632339e6eb7463c to your computer and use it in GitHub Desktop.
Fix the iOS 15 Simulator high CPU usage due to the Spotlight/Suggestions Engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env sh | |
disable_suggestions() { | |
if [ -d "$1" ]; then | |
pushd "$1" || return | |
find . -name com.apple.suggestions.plist \ | |
-exec echo {} \; \ | |
-exec plutil -replace SuggestionsAppLibraryEnabled -bool NO {} \; | |
popd || return | |
fi | |
} | |
disable_suggestions "${HOME}/Library/Developer/Xcode/UserData/Previews/Simulator Devices/" | |
disable_suggestions "${HOME}/Library/Developer/CoreSimulator/Devices/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment