title: Extract GPS data from photo
body: <p>I have a hard time because I want to extract the GPS coordinates from a photo. I use the function <code>imagePickerController:didFinishPickingMediaWithInfo</code> to pick an image and the I am inserting that image in a collectionView using the new Photos framework.
  I want to extract the GPS coordinates from the photo. I have done some research and I am aware of the fact that UIImage does not contain all the metadata, so I tried using the <code>AssetsLibrary</code> framework. 
  Inside <code>didFinishPickingMediaWithInfo</code> I am using the following code to extract the photo location:</p>
  
  <pre><code>    var referenceURL : NSURL = info.objectForKey(UIImagePickerControllerReferenceURL) as NSURL
      var library : ALAssetsLibrary = ALAssetsLibrary()
      library.assetForURL(referenceURL, resultBlock: { (asset : ALAsset!) -&gt; Void in
          var rep : ALAssetRepresentation = asset.defaultRepresentation()
          var metadata : NSDictionary = rep.metadata()
  
  
          let location: AnyObject! = asset.valueForProperty(ALAssetPropertyLocation)
          if location != nil {
              println(location)
          }
          else
          {
              println("Location not found")
          }
  
  
           })
      {
              (error : NSError!) -&gt; Void in
      }
  </code></pre>
  
  <p>However, it doesn't find the location, even though I checked the image and it contains EXIF metadata (it contains also GPS locations, in which I am interested in). How can I retrieve the coordinates from photo?</p>