         for (key, value) in userDefaults.dictionaryRepresentation() where key.hasPrefix(uniqueIdentifierKey) {
             guard let data = value as? Data else { continue }
             let newKey = key.replacingOccurrences(of: "\(uniqueIdentifierKey).", with: "")
-            let object = NSKeyedUnarchiver.unarchiveObject(with: data)
+            let object = NSKeyedUnarchiver.object(data: data)
             settings[newKey] = object
         }
         return settings.description

import Foundation

protocol SharedInstanceType: class {
    init()
}

private var userSettingsSingletons = [String: SharedInstanceType]()


// MARK: Public methods
extension WRUserSettings {
    public func reset() {
        for (property, defaultValue) in defaultValues {
            let value = NSKeyedUnarchiver.object(data: defaultValue)
            self.setValue(value, forKey: property)
        }
    }
