title: Type 'String' does not conform to protocol 'NSCopying' error when getting object from NSDictionary
body: <p>I am getting an error when trying to extract an object from a NSDictionary in Swift:</p>
  
  <blockquote>
    <p>Type 'String' does not conform to protocol 'NSCopying'</p>
  </blockquote>
  
  <p>I tried to cast the key from String to NSString but I does not solve the issue. Can anyone shed some light? Here is the code:</p>
  
  <pre><code>var excerciseCategoryDictionary = object as NSDictionary
  
  let category = NSEntityDescription.insertNewObjectForEntityForName(NSStringFromClass(ExcerciseCategory.self),
                              inManagedObjectContext: AppDelegate.sharedInstance().managedObjectContext) as ExcerciseCategory
  
  category.name = excerciseCategoryDictionary["name"]
  </code></pre>
  
  <p>The error occurs on the last line.</p>
  
  <p><img src="https://i.stack.imgur.com/zf4Gc.png" alt="enter image description here"></p>