[Swift] macOS screen saver

Mac OSx Screen Saver, created using the source file of itself! 🙂


What are the letters?

Letters are the source code of the Screen Saver project (APScreenSaverView.swift).
Every refresh a letter is extracted randomly from file.

Some special characters are colored differently.


This project has two targets:

To run screensaver on your Mac, you must install it.

  • Select from target PaskySaver and click build, next open Products folder, select Pasky-Saver.saver, right-click and select “Show in Finder“. Double click to install in osx.
  • To debug instead, select from target PaskySaverApp and click Build And Run.



1. A massive memory optimization.

This example is created adding an NSTextField every time on screen and removing the oldest one.
In a perfect world, this should be done in OpenGL or drawing in drawRect refresh cycle.

2. Preview view

The view to show in the Preferences->Screen Saver as Preview.

3. Settings view

The setting view

4. Icons

If you want to improve, you’re welcome.

Download sample code here: https://github.com/elpsk/PaskySaver


Alberto Pasca

Software engineer @ Pirelli & C. S.p.A. with a strong passion for mobile  development, security, and connected things.