I am using KeychainWrapper to store a dictionary value however retrieving the items in a string value has come at a problem.
I've tried the following:
KeychainWrapper.standard.object(forKey: "userOptions").unsafelyUnwrapped
Which prints,
(
(
value,
value,
value
)
)
And
KeychainWrapper.standard.object(forKey: "userOptions").unsafelyUnwrapped as! [Any]
which prints
(
value,
value,
value
)
These methods above still appear to be impossible for me to retrieve the string only value from the NSCoding array.
Try as,
let userOptions = (KeychainWrapper.standard.object(forKey: "userOptions").unsafelyUnwrapped as! [[String]]).joined().joined(separator: " ") )