How To Debug A ScreenSaver on Mavericks with XCode 5
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:
- Edit scheme
- Edit your Pre-Actions:
cp -pr "$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME" "$INSTALL_PATH/" - Edit Run Info:
(choose ScreenSaverEngine located in /System/Library/FrameWorks/ScreenSaver.framework/Resources) - Edit Run Arguments:
[1] - Hit ⌘-R
- Links
- Footnotes:
- ↑ For some reason, the build-variables can't be used here, if they could, I'd recommend this:
-background -module "$FULL_PRODUCT_NAME"