title: YouTube Video ID From URL - Swift or Objective-C
body: <p>I have a Youtube url as an <code>NSString</code> or Swift <code>String</code>, but I need to extract the video id that is displayed in the url. I found many tutorials on <a href="https://stackoverflow.com/questions/3452546/how-do-i-get-the-youtube-video-id-from-a-url">how to do this in php or and other web-based programming languages</a>, but none in Objective-C or Swift for Apple platforms...</p>
  <p>I'm looking for a method that asks for an NSString url as the parameter and returns the video id as another NSString...</p>