Sandeep Gangajaliya
Sandeep Gangajaliya

Reputation: 3

Cannot download video from iCloud photo library

I'm getting error when downloading video from photos. The video is stored in iCloud and displaying in photos.

My swift code:

let picker = UIImagePickerController()     
picker.delegate = self
picker.sourceType = .photoLibrary   
picker.mediaTypes = [kUTTypeMovie as NSString as String]  
picker.present(imag, animated: true, completion: nil)

public func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {  

let videoAsset = AVURLAsset.init(url:(info[UIImagePickerControllerMediaURL] as! NSURL) as URL)

}

When UIImagePickerController presented, It's displaying all video file in controller. And then I'm selecting one video that is stored in iCloud. Sometimes I'm getting below error. Not every time.

enter image description here

Can anyone help me to get out this?

Upvotes: 0

Views: 1353

Answers (1)

elisaharris
elisaharris

Reputation: 16

  1. The first tip you should try is to turn off "Low Power Mode." Some icloud features will be reduced when your iPhone or iPad is in low power mode. Go to Settings > Battery and turn off low power mode.
  2. Go to Settings and turn airplane mode on and off. We do this because there may be connectivity issues that might solve the problem.
  3. Make sure you have enough iCloud storage. If the limit is exceeded, your photos will not be uploaded to iCloud.
  4. Exit iCloud by going to Settings > Your Name > Scroll Down > Exit. You will be asked to enter your Apple ID and password. Then go to Settings > Your device and sign in. Don't worry that you won't lose any data, your files (including photos) will be gradually restored from your iCloud account. I hope to help you solve this problem. As far as I know, the more common problem is error downloading image.

Upvotes: 0

Related Questions