UserDefault crash when trying to save version of app with "Attempt to set a non-property-list object 1.3.0 as an NSUserDefaults" #96

Closed
opened 2025-10-14 16:00:56 -06:00 by navan · 0 comments
Owner

Originally created by @stshelton on 9/28/2018

I'm using UserDefaults to save the "keyValueVersionStore" once I clicked the complete button my project is breaking with
Attempt to set a non-property-list object 1.3.0 as an NSUserDefaults/CFPreferences value for key de.tiigi.whatsnewkit.1.3.0

Here is how I set up whatsNewViewController

// Local KeyValueStore
    let keyValueVersionStore = KeyValueWhatsNewVersionStore(
      keyValueable: UserDefaults.standard
    )
    
    let whatsNewController = WhatsNewViewController(whatsNew: whatsNewVersion4, configuration: configuration, versionStore: keyValueVersionStore)
  
    if let controller = whatsNewController {
      // Present it as WhatsNewViewController is available
      // after init with WhatsNewVersionStore
     self.present(controller, animated: true)
    } else {
      // WhatsNewViewController is `nil` this Version has already been presented
    }
*Originally created by @stshelton on 9/28/2018* I'm using UserDefaults to save the "keyValueVersionStore" once I clicked the complete button my project is breaking with Attempt to set a non-property-list object 1.3.0 as an NSUserDefaults/CFPreferences value for key de.tiigi.whatsnewkit.1.3.0 Here is how I set up whatsNewViewController ``` // Local KeyValueStore let keyValueVersionStore = KeyValueWhatsNewVersionStore( keyValueable: UserDefaults.standard ) let whatsNewController = WhatsNewViewController(whatsNew: whatsNewVersion4, configuration: configuration, versionStore: keyValueVersionStore) if let controller = whatsNewController { // Present it as WhatsNewViewController is available // after init with WhatsNewVersionStore self.present(controller, animated: true) } else { // WhatsNewViewController is `nil` this Version has already been presented } ```
navan 2025-10-14 16:00:56 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/WhatsNewKit#96
No description provided.