Returns the list of data resources associated with a Live Photo object.
SDKs
- iOS 9.1+
- tvOS 10.0+
Framework
- Photos
Declaration
class func assetResources(for livePhoto: PHLive Photo) -> [PHAsset Resource]
Parameters
livePhoto
A Live Photo object.
Return Value
The underlying resources that constitute the Live Photo.
Discussion
A Live Photo is a picture, taken with a compatible device, that includes movement and sound from the moments just before and after its capture. A PHLive
object represents the displayable combination of image, motion, and sound data. You can obtain such objects from the Photos library using the PHImage
class or construct them from asset resources exported from a Photos library using the PHLive
class.
Use this method to export the underlying resources that constitute a Live Photo. For example, a social networking app can retrieve those data files and upload them to a server. Then, on another user’s device, the app downloads those data files and uses the PHLive
class to re-create a Live Photo object for display using the PHLive
class.