Keynote deck and Xcode demo project for my talk at tacow on 2016-May-17.
- Draw in bounds, not frame, because multiple displays with an offset arrangement can cause drawing to be shifted.
- Use AVPlayerLayer to play videos, because AVPlayerView inhibits system sleep.
- ScreenSaverDefaults, a subclass of NSUserDefaults, writes to
defaults -currentHostin Terminal to access preferences.
- No Swift—Xcode 7 doesn't offer a Swift option when creating new screen saver projects. System Preferences loads bundles' dylibs just once, so different Swift versions cause problems. There's a recent radar for this.
- Use a Run pre-action script for debugging—copies ScreenSaverEngine.app to
/tmp/and symlinks built .saver to
- Use an Archive post-action script to create installer package. There's an excellent SO answer on OS X installers with details and links.