I\'m using a tuple to store something like this.
var accessLavels: (hasInventoryAccess: Bool, hasPayrolAccess: Bool)
accessLavels = (hasInventoryAccess: true
In the documentation, I don't see any method -setValue
.
Based on the docs, NSUserDefaults is able to save NSString, NSNumber, NSData, NSDictionary, NSArray, NSData and NSDate only. Here is the link:
NSUserDefaults Class Reference.
So, you are not able to save tuple here. And -setValue
is from NSKeyValueCoding
protocol.