I am building an app in Xcode 6 Beta 6 in Swift and I keep getting this error:
[NSObject : AnyObject]?\' does not have a member named \'subscript\'
The error message is saying you can't do [] on Optional value. What you need to do is unwrap it.
[]
Optional
error.userInfo!["error"] as NSString
or if you want to be safe
if let errorString = error.userInfo?["error"] as NSString { println(errorString) }