Quickies

[categories] [index] [all (527)] [latest]

Xcode
  1. Here is an XCode run script build phase, setting your Cocoa app version to the latest date and svn revision each time you build. The values then appear in the Finder or in the application "About" panel.

    In the XCode Project view, click on your target. Choose Project menu > New Build Phase > New Run Script Build Phase. Put this script just before "Copy Bundle Resources". Set the ' CFBundleVersion^ value to __myBundleVersion__.

    Double-clic or apple-I on the Run Script build phase. Paste this python script. Don't forget to set the python path. Also check your svnversion, which may vary.

    Clean your projet, build and run it. You should be able to see something like this.

  2. add a breakpoint on objc_exception_throw

  3. $ defaults write com.apple.Xcode GenerateGraphVizFiles -bool YES
    

    Thank you 0xced.

  4. ctrl + arrow keys

  5. $ defaults write com.apple.Xcode NSRecentDocumentsLimit 25
    
  6. #pragma mark -
    #pragma mark NSTableDataSource protocol
    

  7. $ /Developer/usr/bin/xcodeindex -project MyProject.xcodeproj rebuild
    

    See also the dumpaction.

  8. $ defaults write com.apple.Xcode PBXBuildFailureSound ~/sound.mp3
    
  9. $ defaults write com.apple.xcode PBXCustomTemplateMacroDefinitions '{ORGANIZATIONNAME="MY_COMPANY SA";}'
    
  10. $ defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
    
  11. $ defaults delete com.apple.Xcode PBXExternalEditorList
    
  12. $ dwarfdump --uuid *.xcarchive/dSYMs/XXX.app.dSYM
    
    $ dwarfdump --lookup=0x0008157b *.xcarchive/dSYMs/XXX.app.dSYM