As I haven't found a way to edit my first answer above: I have found a solution to fix the SwiftUI Preview simulators
- Find all
com.apple.suggestions.plistfiles in~/Library/Developer/Xcode/UserData/Previews/Simulator Devices/ - Set the key
SuggestionsAppLibraryEnabledtoNO
The following script does the job nicely:
cd ~/Library/Developer/Xcode/UserData/Previews/Simulator\ Devices/
find . -name com.apple.suggestions.plist -exec plutil -replace SuggestionsAppLibraryEnabled -bool NO {} ";"
This approach also works for regular Simulator instances.
Instead of opening "Settings" and disabling "Suggestions on Home Screen", you can use below script to do the job:
cd ~/Library/Developer/CoreSimulator/Devices
find . -name com.apple.suggestions.plist -exec plutil -replace SuggestionsAppLibraryEnabled -bool NO {} ";"
评论
发表评论