Tuesday, 9 October 2018

The app always crashes when saving to UserDefaults

I completely dont know what is wrong:

extension UserDefaults {

    static let shared = UserDefaults(suiteName: SharedGroupName)!

    static func set(object: Any, forKey key: String) {

        shared.set(object, forKey: key)
        shared.synchronize()
    }
}

enter image description here



from The app always crashes when saving to UserDefaults

No comments:

Post a Comment