Skip to content

Instantly share code, notes, and snippets.

@st3fan
Created November 6, 2021 15:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save st3fan/575d39fb6b8b8b4c7c96fe8cf9b29d55 to your computer and use it in GitHub Desktop.
Save st3fan/575d39fb6b8b8b4c7c96fe8cf9b29d55 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# Disable Siri Suggestions on Simulators and SwiftUI Previews to
# avoid Spotlight heating up your MacBook by keeping 4 cores busy
# at 100%.
#
# See https://developer.apple.com/forums/thread/683277
#
cd ~/Library/Developer/Xcode/UserData/Previews/Simulator\ Devices
find . -name com.apple.suggestions.plist \
-exec plutil -replace SuggestionsAppLibraryEnabled -bool NO {} ";"
cd ~/Library/Developer/CoreSimulator/Devices
find . -name com.apple.suggestions.plist \
-exec plutil -replace SuggestionsAppLibraryEnabled -bool NO {} ";"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment