I\'m trying to add an item to the iOS keychain using Swift but can\'t figure out how to type cast properly. From WWDC 2013 session 709, given the following Objective-C code:
You simply need to downcast the literal:
let dict = ["hi": "Pasan"] as NSDictionary
Now dict is an NSDictionary. To make a mutable one, it's very similar to Objective-C:
dict
let mDict = dict.mutableCopy() as NSMutableDictionary mDict["hola"] = "Ben"