0

I want to share multiple UIImages to Camera Roll by using UIActivityViewController. However, when I share more than 5 photos, it often loses photos. It seems like iOS's bug?

// images: [UIImage]
let activityVC = UIActivityViewController(avtivityItems: images, applicationActivities: nil)
present(activityVC, animated: true, completion: nil)

I want to save as many photos to Camera Roll as I have chosen when I tap option called "Save XX photos to album" which appears in activityVC. But it often failed. Is there any way to guarantee not lose photos?

Salman Ghumsani
  • 3,647
  • 2
  • 21
  • 34
Pancf
  • 1
  • 1
  • Does it fail with any error? I usually do a `vc.completionWithItemsHandler = {(activity, success, items, error) in self.dismissMe()}` where `vc` is the controller and `dismissMe()` is a simple function to dismiss `vc`. –  Dec 12 '17 at 15:24
  • @dfd When I use `UIImageWriteToSavedPhotosAlbum()` to save more than 5 photos, it often failed because of "write busy" which I can know from callback. But using `UIActivityViewController`, I can't get anything about error. I suppose that the error is "write busy"? – Pancf Dec 15 '17 at 02:18
  • I honestly don't know, I only share a single photo at a time. BUT... looking at the related questions on the right, I saw this (https://stackoverflow.com/questions/18868547/share-more-than-5-images-with-uiactivityviewcontroller?rq=1) and the accepted answer claims this is normal behavior. –  Dec 15 '17 at 03:20
  • I have seen that, and someone said it existed for quite a long time. So maybe it's intended. – Pancf Dec 15 '17 at 03:48

0 Answers0