I am taking a photo with the camera and UIImagePickerController and then saving it to the photo albums with
@objc func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
ImagePicker.dismiss(animated: true, completion: nil)
photoChanged = true
let image: UIImage = info[UIImagePickerControllerOriginalImage] as! UIImage
let compressedImage = image.resizeWithWidth(width: 450)
let ext: String = "JPEG"
UIImageWriteToSavedPhotosAlbum(image, self, #selector(image(image:didFinishSavingWithError:contextInfo:)), nil)
submittedPhoto = Photo(photo: compressedImage, ext: ext, key: nil, idx: nil, postId: post?.postId)
if let cell = tableView.cellForRow(at: IndexPath(row: 1, section: 0)) as? SubmitHunterTVC {
cell.addPhotoB.iconImageView.image = image
cell.addPhotoB.iconImageView.contentMode = .scaleAspectFill
cell.addPhotoB.clipsToBounds = true
}
tableView.reloadData()
}
When I retrieve the asset and check the location I get empty {GPS} information from the EXIF and the asset.
E7F0DDE0-3A89-4E77-AF0C-2AED2A4F96FF/L0/001 mediaType=1/0, sourceType=1, (3024x4032), creationDate=2018-03-18 22:19:36 +0000, location=0, hidden=0, favorite=0