I know how to extract video from a live photo. Explained here.
Use the PHAssetResourceManager
to get the video file from the PHAssetResource
.
PHAssetResourceManager.defaultManager().writeDataForAssetResource(assetRes,
toFile: fileURL, options: nil, completionHandler:
{
// Video file has been written to path specified via fileURL
}
But how to extract image URL from PHLivePhoto. The motivation behind this is to get both video and image URL in order to upload it to the server.