How To Debug A ScreenSaver on Mavericks with XCode 5

From Wurst-Wasser.net
Revision as of 17:34, 5 April 2014 by Heiko (talk | contribs) (→‎How?)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Why?

Until now, I installed the screensaver, launched System Preferences, chose the ScreenSaver and debugged it. There had to be a simpler way. And there is.

How?

The idea is to tell XCode to use the ScreenSaverEngine as executable and launch it with our built screensaver.

This is how you do it:

  1. Edit scheme
  2. Edit your Pre-Actions:

    cp -pr "$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME" "$INSTALL_PATH/"
  3. Edit Run Info:

    (choose ScreenSaverEngine located in /System/Library/FrameWorks/ScreenSaver.framework/Resources)
  4. Edit Run Arguments:
    [1]
  5. Hit ⌘-R

  • Links
  • Footnotes:
  1. For some reason, the build-variables can't be used here, if they could, I'd recommend this:
    -background -module "$FULL_PRODUCT_NAME"