Skip to content

luximetr/demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What's new in XCode. Tips and tricks.

Build

Parallelize build 

alt text

Compilation mode «Incremental»

alt text

defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool YES | NO

alt text

Product -> Perform action -> Build with timing summary

alt text

Tests

  • maximum-concurrent-test-simulator-destinations NUMBER : the maximum number of simulator destinations to test on concurrently
  • parallel-testing-enabled YES|NO : overrides the per-target setting in the scheme
  • parallel-testing-worker-count NUMBER : the exact number of test runners that will be spawned during parallel testing
  • maximum-parallel-testing-workers NUMBER : the maximum number of test runners that will be spawned during parallel testing

Shortcuts

  • Cmd+Shift+O - open quickly
  • Cmd+Shift+J - reveal in project navigator
  • Ctrl+0 - select target
  • Ctrl+Shift+0 - select device
  • Cmd+B - build
  • Cmd+R - run
  • Cmd+. - stop
  • Ctrl+T - open new tab

Actions

Cmd+Click at code for open actions

For classes:

  • fold
  • create method
  • edit in scope
  • rename
  • etc.

For methods:

  • add parameter
  • add return type
  • callers
  • etc.

Source control

Source control states

alt text

Multi cursor editing

Ctrl+Shilf+Click alt text

Option+Drag mouse alt text

Code snippets

For create code snippet you select code that you want, click on it with right button and select 'Create Code Snippet'.

alt text

<# placeholder text #> - for template code

You can chose:

  • platform (iOS, macOS)
  • language (Swift, Obj-C)
  • completion scope (function, top level)
  • completion shortcut

File templates

mkdir -p ~/Library/Developer/Xcode/Templates/File\ Templates/Mine

cp -R /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File\ Templates/Source/Swift\ File.xctemplate/ ~/Library/Developer/Xcode/Templates/File\ Templates/Mine/Protocol\ with\ Extension.xctemplate

Breakpoints

Breakpoint actions:

  • activate / disable
  • condition
  • ignoring n times before stop
  • log message (@exp@ - expression, %B - breakpoint name, %H - hit count )
  • debugger command like 'po'
  • play sound
  • automatically continue

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages