1

Is there a way to get the URLs of videos that are included in the Photos library?

I want to compare them to a table view list, then pick and play that video.

Cocoatype
  • 2,572
  • 25
  • 42
John Z
  • 125
  • 1
  • 13

1 Answers1

1

If you're using the newer Photos framework (which you should unless you're still needing to support < iOS 8) and your goal is to simply compare items retrieved from the photo library for uniqueness, I'd recommend fetching PHAssets from the PHPhotoLibrary and using the PHObject's localIdentifier getter to compare the items.

If you're not using the Photos framework, you can also use AVAsset's URL property to get the local file path for a specific AVURLAsset.

William LeGate
  • 540
  • 7
  • 18