NathanFriend.co.uk

Developers notebook

Category: Mac

Xcode Code signing fails, detritus not allowed

When running a build in Xcode results in the error ‘Code signing fails with error ‘resource fork, Finder information, or similar detritus not allowed’

Use xattr -cr /app_directory to fix

Source: https://developer.apple.com/library/content/qa/qa1940/_index.html

Flush DNS cache on OS X Yosemite

sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder

Colour terminal output on OSX

Edit
.profile
.bashrc
.bash_profile

Add
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced

 

Source: http://stackoverflow.com/questions/1550288/mac-os-x-terminal-colors

Xcode keyboard shortcuts

cmd + s Save

cmd + r Run

cmd + . Stop

Really speeds up the edit and try cycle.

OSX removing locked files from the trash.

Advanced tip about deleting locked files

If there are several locked files in the Trash, you can unlock them all at the same time at the command line. Follow these steps:

  1. Open Terminal. It’s located in /Applications/Utilities.Type: chflags -R nouchg

    Note: Type one space (not pictured) after nouchg in the line above, so that it ends in "nouchg ". Do not press Return yet.

  2. Double-click the Trash icon in the Dock to reveal the contents of the Trash. If necessary, arrange the Finder window so that a portion of the Terminal window is still visible.
  3. Press the Command-A key combination to select all files in the Trash.
  4. Drag the files from the Trash to the Terminal window.
    Note: This automatically enters the pathname for each file. This eliminates the need to individually empty multiple Trash directories, particularly when multiple disks or volumes are present.
  5. Press Return. No special text message will be shown indicating that the command was successful.
  6. Empty the Trash.

Source: http://support.apple.com/kb/HT1526?viewlocale=en_US&locale=en_US

© 2017 NathanFriend.co.uk

Theme by Anders NorenUp ↑