It seems like whatever I do, I am just not able to get the screensaver working on macOS 10.14. I think it may have something to do with Principal class, although I am not sure. It could be due to the issue described here: https://stackoverflow.com/questions/33401187/you-cannot-use-the-screensaver-with-this-version-of-os-x, if you'd like to take a look.