An ALAsset object represents a photo or a video managed by the Photo application.


class ALAsset : NSObject


Assets can have multiple representations, for example a photo which was captured in RAW and JPG. Different representations of the same asset may have different dimensions.


Asset Properties

func value(forProperty: String!) -> Any!

Returns the value for a given property.

var isEditable: Bool

Indicates whether the asset is editable.

var original: ALAsset!

The original version of the asset.

Accessing Representations

func defaultRepresentation() -> ALAssetRepresentation!

Returns an asset representation object for the default representation.

func representation(forUTI: String!) -> ALAssetRepresentation!

Returns an asset representation object for a given representation UTI.

func thumbnail() -> Unmanaged<CGImage>!

Returns a thumbnail representation of the asset.

func aspectRatioThumbnail() -> Unmanaged<CGImage>!

Returns an aspect ratio thumbnail of the asset.

Setting New Image and Video Data


Property Keys

Constants for the keys for the properties you can get from an asset.

Invalid Property Value

A constant to indicate that a property accessed by value(forProperty:) is invalid.

Asset Types

Constants that specify the type of an asset.


Inherits From

Conforms To