-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdefaults
82 lines (62 loc) · 3.51 KB
/
defaults
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/zsh
## Xcode
# Backup Xcode defaults
defaults read com.apple.dt.Xcode > ~/Desktop/XcodeDefaults.plist
# Restore Xcode vanilla defaults
# If you delete/move the current plist, Xcode will write a fresh one next time you run it.
killall Xcode
mv ~/Library/Preferences/com.apple.dt.Xcode.plist ~/Desktop/XcodeDefaults.plist
open -b com.apple.dt.Xcode
# Enable project build time
defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool YES
# Enable parallel builds for Swift
defaults write com.apple.dt.Xcode BuildSystemScheduleInherentlyParallelCommandsExclusively -bool YES
# Disable parallel builds for Swift
# Xcode 9.3+ now runs more Swift build tasks in parallel with other commands.
# This may improve build times for Swift projects, but may also increase memory use during the build.
# This feature can be disabled from Terminal by setting a user default with
defaults write com.apple.dt.Xcode BuildSystemScheduleInherentlyParallelCommandsSerially -bool YES
# Enable multi-cursor editing
defaults write com.apple.dt.Xcode PegasusMultipleCursorsEnabled -bool YES
# Enable maximum number of concurrent compile tasks
defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks `sysctl -n hw.ncpu`
# Enable extensive per operation timing logs
defaults write com.apple.dt.Xcode IDEBuildOperationTimingLogLevel -int 3
# Enable indexing
defaults delete com.apple.dt.Xcode IDEIndexDisable
defaults write com.apple.dt.XCode IDEIndexEnable -bool YES
# Disable indexing
defaults delete com.apple.dt.Xcode IDEIndexEnable
defaults write com.apple.dt.XCode IDEIndexDisable -bool YES
# Show Indexing numeric progress
defaults write com.apple.dt.Xcode IDEIndexerActivityShowNumericProgress -bool YES
# Show Indexing logging
# This will show you why a particular file is having trouble being compiled for indexing.
defaults write com.apple.dt.Xcode IDEIndexShowLog -bool YES
# Show prebuild step logs
defaults write com.apple.dt.Xcode IDEShowPrebuildLogs -bool YES
# Set SourceKit log level
# If set to SourceKit will write a log to /tmp with all the details of what it is doing while indexing.
# A lot of people find they have header hygiene problems or module problems that happen to work while building in certain configurations but aren't actually correct,
# resulting in missing modules or broken headers from the indexer's point of view. May not work anymore.
defaults write com.apple.dt.Xcode IDESourceKitServiceLogLevel -int 3
# Enable internal Xcode (debug) menu
defaults write com.apple.dt.Xcode ShowDVTDebugMenu -bool YES
# Disable automatic reopening of last project
# Prevents Xcode from automatically restoring the last open project.
# This enables running multiple Xcode versions for different projects.
defaults write com.apple.dt.Xcode ApplePersistenceIgnoreState -bool YES
# Some minimal additional logging
defaults write com.apple.dt.XCBuild EnableDebugActivityLogs -bool YES
# Enable build debugging mode
# This slows down the build system & litters DerivedData//Build/Intermediates.noindex),
# generally should only be enabled when trying to capture a trace for incremental build debugging purposes.
defaults write com.apple.dt.XCBuild EnableBuildDebugging -bool YES
# Simulator
# Enable Simulator fullscreen mode
defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES
# XCBuild
# Enable Build Debugging
# Creates an XCBuildData folder in ~/Library/Developer/Xcode/DerivedData/<your target>/Build/Intermediates.noindex/
# which contains debugging info for xcodebuild.
defaults write com.apple.dt.XCBuild YES