How to fix exception:
[User Defaults] Attempt to set a non-property-list object {
4 = 5;
} as an NSUserDefaults/CFPreferences value for key MyKey
thrown by executing following code (Swift 3)
let ns = NSDictionary(dictionary: [4: 5])
UserDefaults.standard.set(ns, forKey: "MyKey")
Code above correctly saves String
type, but has problem with NSDictionary