I'm trying to upload videos to my firebase database but when ever i select a video in the app and the video is compressed my app gives me the following:
[AXRuntimeCommon] Unknown client: "AppName"
[core] "Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)""
[AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:5979 ( ... )
I am not sure if this is to do with giving the app permission to access the media as i have done this.
This is my code that i am using to add the video to firebase:
func uploadVideo() {
let videoPicker = UIImagePickerController()
videoPicker.allowsEditing = true
videoPicker.mediaTypes = [kUTTypeMovie as String]
present(videoPicker, animated: true, completion: nil)
}
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
if let videoUrl = info[UIImagePickerController.InfoKey.mediaURL] as? NSURL {
let fileName = "Videos.mov"
let storageRef = Storage.storage().reference().child(fileName)
storageRef.putFile(from: videoUrl as URL, metadata: nil, completion: { (metadata, error) in
if error != nil {
print("Failed upload of Video:", error)
return
}
storageRef.downloadURL(completion: { (downloadURL, error) in
if let storageUrl = downloadURL?.absoluteString {
print(storageUrl)
}
})
})
}
}
If there a way that i can fix this?