Processing sketch as Mac Os Screen Saver error

I made a sketch and I saved it as an executable file for mac os. I changed the extension from .app to .saver and installed it as a screen saver but my System Preferences is showing me an error when I preview the screen saver.
“You cannot use the screen saver with this version of macOS. Please contact the vendor to get a newer version of the screen saver.” I’m wondering what my sketch might be missing.

You can’t convert a .app into .saver. If you want to use a Processing sketch as your screensaver, you could record it with an external app, then convert it using some apps to an screensaver.

Ok, thank you, I will try doing that. I thought it might work because I thought I saw someone else do something similar on windows.