System Preferences caching Swift libraries causing screensaver to display "You cannot use ... screen saver with this version of OS X."

Originator:edward
Number:rdar://28847200 Date Originated:16 October 2016
Status:Open Resolved:
Product:macOS Product Version:10.12.0
Classification:UI/Usability Reproducible:YES
 
Summary:
Summary:
When you open a screensaver written in Swift in System Preferences it seems to cache the Swift libraries that are contained within the screensaver. If you then try to open another screensaver written in Swift, if it was written against another version of the Swift libraries System Preferences will display an error message "You cannot use the  XXX saver with this version of OS X."

Steps to Reproduce:
Steps to Reproduce:
1. Download the binary version 1.2 Beta 5 of the Aerial screensaver. https://github.com/JohnCoates/Aerial/releases/tag/v1.2beta5
2. Download the binary version 0.5 of the Clock screensaver https://github.com/soffes/clock-saver/releases/tag/v0.5.0
3. Install these binaries to "~/Library/Screen Savers"
4. Open System Preferences
5. Select Desktop & Screen Saver
6. Select Aerial - it will load and preview successfully
7. Select Clock - it will display the "You cannot use ... screen saver with this version of OS X." error message

To confirm the it's caching Swift libraries:

1. Download the source for Aerial and Clock using the "Download ZIP" links at https://github.com/JohnCoates/Aerial/ and https://github.com/soffes/clock-saver
2. Compile both (which results in bundles that contain the same Swift libraries)
3. Copy both to "~/Library/Screen Saver"
4. Open System Preferences and try switching between them. It should work reliably as they are using the same version of the Swift libraries.

Expected Results:
I would expect to be able to select different screen savers and not see the error message

Actual Results:
System Preferences is loading the Swift libraries that are bundled within the first selected screensaver. It then attempts to use them with the subsequent Swift screen savers and displays the "You cannot use ... screen saver with this version of OS X." error message because they've been compiled against a different version.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!