My app keeps crashing whenever I try to take a picture to upload to Parse as the user's profile picture. Spent hours looking online, but can't figure it out. Please help
func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [NSObject : AnyObject]) {
let pickedImage: UIImage = info[UIImagePickerControllerOriginalImage] as! UIImage
let imageData = UIImagePNGRepresentation(pickedImage)
let imageFile:PFFile = PFFile(data: imageData)
PFUser.currentUser()!.setObject(imageFile, forKey: "profile_picture")
PFUser.currentUser()!.saveInBackground()
picker.dismissViewControllerAnimated(true, completion: nil)
}