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

Originator:klaasmer
Number:rdar://35567126 Date Originated:15/11/2017
Status:Duplicate/25569037 Resolved:
Product: Product Version:
Classification: Reproducible:
 
Summary: 
This is a duplicate of radar #25569037

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:
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. Download the iOS Saver screensaver from http://bodysoulspirit.weebly.com/ios-screensaver-for-osx.html
4. Install the three binaries to "~/Library/Screen Savers"
5. Open System Preferences
6. Select Desktop & Screen Saver
7. Select Aerial - it will load and preview successfully
8. Select Clock - it will display the "You cannot use ... screen saver with this version of OS X." error message
9. Select iOS Saver - it will display the error message

To prove what I'm saying about it being the bundled 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:
What I think is happening... 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.

Version:
10.11.4

Notes:


Configuration:

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!