title: Get string from userInfo Dictionary
body: <p>I have a userInfo dictionary from a UILocalNotification.  Is there an easy way to get the String value when using implicit unwrapping?  </p>
  
  <pre><code>if let s = userInfo?["ID"]
  </code></pre>
  
  <p>Gives me a AnyObject that I have to cast to a string.</p>
  
  <pre><code>if let s = userInfo?["ID"] as String 
  </code></pre>
  
  <p>Gives me an error about StringLiteralConvertable</p>
  
  <p>Just didn't want to have to declare two variables to get a string - one literal for the unwrap and another var for the casted string.</p>
  
  <p>Edit</p>
  
  <p>Here is my method.  This doesn't work either - I get (NSObject, AnyObject) is not convertible to String on the if statement.</p>
  
  <pre><code>  for notification in scheduledNotifications
    {
      // optional chainging 
      let userInfo = notification.userInfo
  
      if let id = userInfo?[ "ID" ] as? String
      {
        println( "Id found: " + id )
      }
      else
      {
        println( "ID not found" )
      }
    }
  </code></pre>
  
  <p>I don't have it in my question, but besides getting this way to work, I'd like to actually have</p>
  
  <pre><code>if let s = notification.userInfo?["ID"] as String 
  </code></pre>