SvenTiigi / WhatsNewKit

Showcase your awesome new app features 📱
https://sventiigi.github.io/WhatsNewKit/
MIT License
3.92k stars 193 forks source link

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

Closed stshelton closed 6 years ago

stshelton commented 6 years ago

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
    }
SvenTiigi commented 6 years ago

Hey @stshelton

Sorry for the late response I was on vacation 🤙

Your issue seems identically to this Issue https://github.com/SvenTiigi/WhatsNewKit/issues/2 The problem was fixed due WhatsNewKit Version 1.1.1

Please ensure you are using WhatsNewKit Version 1.1.1 and then test it again 🙌

stshelton commented 6 years ago

No problem, but it did work appreciate the help. Love the library!

SvenTiigi commented 6 years ago

Perfect :)

Thank you I appreciate it 🙌