Skip to content

Instantly share code, notes, and snippets.

@embassem
Forked from durul/Xcode Defaults.md
Created February 11, 2018 01:50
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save embassem/16c8163e7582a2170e4579d86f0d19e1 to your computer and use it in GitHub Desktop.
Save embassem/16c8163e7582a2170e4579d86f0d19e1 to your computer and use it in GitHub Desktop.
Xcode Defaults

Xcode Defaults

Command Line

# Enable internal menu
defaults write com.apple.dt.Xcode ShowDVTDebugMenu -bool YES

# Enable project build time
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES

# Reduce the number of compile tasks and stop indexing
defaults write com.apple.dt.XCode IDEIndexDisable 1 

# Save all xcode preferences to a file
defaults read com.apple.dt.XCode > xcodeprefs.json

# Show all devices and their information you have plugged in before 
defaults read com.apple.dt.XCode DVTSavediPhoneDevices

# Improve performance
defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 5 

# Improve performance by leveraging multi-core CPU 
defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks `sysctl -n hw.ncpu`

# Delete these settings
defaults delete com.apple.dt.XCode IDEIndexDisable 
@embassem
Copy link
Author

default is
ShowBuildOperationDuration = NO;
XCFontAndColorCurrentTheme = "Default.xccolortheme";
Xcode3BuildSettingsEditorMode = 0;
Xcode3ProjectEditorSourceListVisible = 0;

@embassem
Copy link
Author

5] XCCONFIG Files
Most of you might be using .xcconfig files to keep the Xcode build settings at one place for the particular targets. There are some issues that conditional variable assignment in the xcconfig files might not work as expected, causing the build failures. In order to check your xcconfig files, Apple recommended running following command.

defaults write com.apple.dt.XCBuild EnableCompatibilityWarningsForXCBuildTransition -bool YES

If this command shows any warnings or errors, we need to fix that to get stable builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment