All Projects → ctreffs → Xcode Defaults

ctreffs / Xcode Defaults

Licence: other
Awesome and useful Xcode defaults

Projects that are alternatives of or similar to Xcode Defaults

Nativelogin
Authorization form in native iOS style
Stars: ✭ 140 (-64.91%)
Mutual labels:  apple, xcode
Macos Cookbook
A Chef cookbook used to provision macOS
Stars: ✭ 183 (-54.14%)
Mutual labels:  apple, xcode
Apple Device Model List
All Apple devices model name list. 通过内部编号判断 iOS 设备型号。
Stars: ✭ 149 (-62.66%)
Mutual labels:  apple, xcode
Ios Good Practices
Good ideas for iOS development, by Futurice developers.
Stars: ✭ 10,417 (+2510.78%)
Mutual labels:  apple, xcode
Sketch Ios Library
💎 A library of iOS styles replicated in Sketch to speed up your workflow.
Stars: ✭ 264 (-33.83%)
Mutual labels:  apple, xcode
Swift Summary
A summary of Apple's Swift language written on Playgrounds
Stars: ✭ 1,668 (+318.05%)
Mutual labels:  apple, xcode
React Native Unified Contacts
Your best friend when working with the latest and greatest Contacts Framework in iOS 9+ in React Native.
Stars: ✭ 156 (-60.9%)
Mutual labels:  apple, xcode
Doric
Protocol oriented, type safe, scalable design system foundation swift framework for iOS.
Stars: ✭ 75 (-81.2%)
Mutual labels:  apple, xcode
Swiftui Sliders
🚀 SwiftUI Sliders with custom styles
Stars: ✭ 241 (-39.6%)
Mutual labels:  apple, xcode
Periphery
A tool to identify unused code in Swift projects.
Stars: ✭ 3,017 (+656.14%)
Mutual labels:  apple, xcode
Wwdc Recap
A collection of session summaries in markdown format, from WWDC 20, 19 & 17
Stars: ✭ 121 (-69.67%)
Mutual labels:  apple, xcode
Xresign
XReSign - developer tool to sign or resign iOS app (.ipa) files with a digital certificate from Apple.
Stars: ✭ 277 (-30.58%)
Mutual labels:  apple, xcode
Appstoreconnect Cli
An easy to use command-line tool for interacting with the Apple AppStore Connect API
Stars: ✭ 110 (-72.43%)
Mutual labels:  apple, developer-tools
Swiftui Shapes
🚀 Collection of SwiftUI shapes
Stars: ✭ 137 (-65.66%)
Mutual labels:  apple, xcode
Stompclientlib
Simple STOMP Client library, Swift 3 and 4, 4.2, 5 compatible
Stars: ✭ 99 (-75.19%)
Mutual labels:  apple, xcode
Alerttoast
Create Apple-like alerts & toasts using SwiftUI
Stars: ✭ 151 (-62.16%)
Mutual labels:  apple, xcode
Wwdc
The unofficial WWDC app for macOS
Stars: ✭ 8,137 (+1939.35%)
Mutual labels:  apple, developer-tools
Nord Xcode
An arctic, north-bluish clean and elegant Xcode color theme.
Stars: ✭ 63 (-84.21%)
Mutual labels:  apple, xcode
Shsearchbar
The search bar that doesn't suck.
Stars: ✭ 206 (-48.37%)
Mutual labels:  apple, xcode
Swiftui Charts
🚀 SwiftUI Charts with custom styles
Stars: ✭ 272 (-31.83%)
Mutual labels:  apple, xcode

Xcode defaults

Check Markdown links License: CC BY-ND 4.0

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/Disable indexing

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 

Disable Main Thread Checker

Deactivates the Main Thread Checker. Found in Xcode 12 release notes

defaults write com.apple.dt.Xcode DVTDisableMainThreadChecker 1

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

Make Assistant aware of more companion files

Make Xcode's Assistant aware of your ViewModels, Views, etc. Found by @peterfriese

defaults write com.apple.dt.Xcode IDEAdditionalCounterpartSuffixes -array-add "ViewModel" "View" "Screen"

Disable move files on restructure

Do not move files when you restructure things in an Xcode project. Found by @steinpete

defaults write com.apple.dt.Xcode IDEDisableStructureEditingCoordinator -bool YES 

Disable state restoration

Stop Xcode from reopening files on launch. Found by @SmileyKeith

defaults write com.apple.dt.Xcode IDEDisableStateRestoration -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 -bool YES

🗑️ Xcode Cleanups

Remove all Xcode DerivedData

... provided Xcode is set to default folder locations. This is a quick win and helps to get back gigabytes of storage space. Do this regularly.

rm -rdf ~/Library/Developer/Xcode/DerivedData/*

Remove all Xcode DeveloperTools cache files

... provided Xcode is set to default folder locations.

CACHE=$(getconf DARWIN_USER_CACHE_DIR)
rm -rdf ${CACHE}com.apple.DeveloperTools
rm -rdf ${CACHE}org.llvm.clang.$(whoami)/ModuleCache
rm -rdf ${CACHE}org.llvm.clang/ModuleCache
rm -rdf ~/Library/Caches/com.apple.dt.*/*

Remove all Xcode / Swift temporary files.

TMP=$(getconf DARWIN_USER_TEMP_DIR)
rm -rdf ${TMP}*.swift
rm -rdf ${TMP}ibtool*
rm -rdf ${TMP}*IBTOOLD*
rm -rdf ${TMP}supplementaryOutputs-*
rm -rdf ${TMP}xcrun_db
rm -rdf ${TMP}sources-*
rm -rdf ${TMP}com.apple.dt.*
rm -rdf ${TMP}com.apple.test.*

Cleanup tools

  • DevCleaner If you want to reclaim tens of gigabytes of your storage used for various Xcode caches - this tool is for you!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].