Search code examples
objective-cmacosscreensaverkiosk

How do I shut off the Mac screensaver?


I'm writing an application that uses Apple's kiosk mode. I would like to disable the screen saver, but the "ScreenSaverDefaults" class reports itself as being 32-bit only. I can change the build to be 32-bit only, but I would like to be able to support 64-bit architectures as well.

Are there any other Frameworks that I should use to disable the screen saver?


Solution

  • What I ended up doing was directly reading the com.apple.screensaver preference file and modifying the idleTime and askForPassword values so that the are zero. A simple CFPreferencesSynchronize and all was well!