2

I have implemented the PHLivePhoto framework for saving photo's as PHAsset objects, which works fine. However, sharing livePhoto's using UIActivityController raises the following error:

Error: resource not available

Below is my code:

                PHLivePhoto.request(withResourceFileURLs: [ URL(fileURLWithPath: FilePaths.VidToLive.livePath + "/IMG.MOV"), URL(fileURLWithPath: FilePaths.VidToLive.livePath + "/IMG.JPG")],
                                placeholderImage: nil,
                                targetSize: videoSize!,
                                contentMode: PHImageContentMode.aspectFit,
                                resultHandler: { (livePhoto, info) -> Void in
                                    if let objLivePhoto = livePhoto {
    let objShare = [objLivePhoto]
    let activityController = UIActivityViewController.init(activityItems: objShare, applicationActivities: nil)
                controller.present(activityController, animated: true, completion: {
        })

      }

  })
bajocode
  • 260
  • 2
  • 10
Hardik Halani
  • 290
  • 2
  • 12
  • Sharing PHAssets through UIActivityController seems to cause issues: https://stackoverflow.com/questions/43707939/sharing-video-phasset-via-uiactivitycontroller – bajocode May 29 '17 at 08:25

0 Answers0