---
title: ALAssetsLibrary
framework: assetslibrary
role: symbol
role_heading: Class
path: assetslibrary/alassetslibrary
---

# ALAssetsLibrary

An instance of ALAssetsLibrary provides access to the videos and photos that are under the control of the Photos application.

## Declaration

```occ
@interface ALAssetsLibrary : NSObject
```

## Overview

Overview important: The Assets Library framework is deprecated as of iOS 9.0. Instead, use the Photos framework instead, which in iOS 8.0 and later provides more features and better performance for working with a user’s photo library. For more information, see Photos. In the Photos framework, the PHPhotoLibrary class manages access to and changes in the photo library, and class methods on the PHAsset and PHCollection classes and related classes provide functionality for finding photo and video assets. The library includes those that are in the Saved Photos album, those coming from iTunes, and those that were directly imported into the device. You use it to retrieve the list of all asset groups and to save images and videos into the Saved Photos album. You create an instance of ALAssetsLibrary using alloc and init: ALAssetsLibrary* library = [[ALAssetsLibrary alloc] init]; The lifetimes of objects you get back from a library instance are tied to the lifetime of the library instance. Many of the methods declared by ALAssetsLibrary take blocks for failure and success as arguments. These methods are all asynchronous because the user may need to be asked to grant access to the data.

## Topics

### Constants

- [ALAssetsGroupType](assetslibrary/alassetsgrouptype.md)
- [Types of Asset](assetslibrary/types-of-asset.md)
- [ALAssetOrientation](assetslibrary/alassetorientation.md)
- [ALAssetsLibraryGroupsEnumerationResultsBlock](assetslibrary/alassetslibrarygroupsenumerationresultsblock.md)
- [ALAssetsLibraryAssetForURLResultBlock](assetslibrary/alassetslibraryassetforurlresultblock.md)
- [ALAssetsLibraryWriteImageCompletionBlock](assetslibrary/alassetslibrarywriteimagecompletionblock.md)
- [ALAssetsLibraryWriteVideoCompletionBlock](assetslibrary/alassetslibrarywritevideocompletionblock.md)
- [ALAssetsLibraryAccessFailureBlock](assetslibrary/alassetslibraryaccessfailureblock.md)
- [ALAssetsLibraryGroupResultBlock](assetslibrary/alassetslibrarygroupresultblock.md)
- [ALAuthorizationStatus](assetslibrary/alauthorizationstatus.md)
- [Notification Keys](assetslibrary/notification-keys.md)
- [Error Domain](assetslibrary/error-domain.md)
- [Error Codes](assetslibrary/error-codes.md)

### Notifications

- [ALAssetsLibraryChangedNotification](assetslibrary/alassetslibrarychangednotification.md)

### Instance Methods

- [addAssetsGroupAlbumWithName:resultBlock:failureBlock:](assetslibrary/alassetslibrary/addassetsgroupalbumwithname:resultblock:failureblock:.md)
- [assetForURL:resultBlock:failureBlock:](assetslibrary/alassetslibrary/assetforurl:resultblock:failureblock:.md)
- [enumerateGroupsWithTypes:usingBlock:failureBlock:](assetslibrary/alassetslibrary/enumerategroupswithtypes:usingblock:failureblock:.md)
- [groupForURL:resultBlock:failureBlock:](assetslibrary/alassetslibrary/groupforurl:resultblock:failureblock:.md)
- [videoAtPathIsCompatibleWithSavedPhotosAlbum:](assetslibrary/alassetslibrary/videoatpathiscompatiblewithsavedphotosalbum:.md)
- [writeImageDataToSavedPhotosAlbum:metadata:completionBlock:](assetslibrary/alassetslibrary/writeimagedatatosavedphotosalbum:metadata:completionblock:.md)
- [writeImageToSavedPhotosAlbum:metadata:completionBlock:](assetslibrary/alassetslibrary/writeimagetosavedphotosalbum:metadata:completionblock:.md)
- [writeImageToSavedPhotosAlbum:orientation:completionBlock:](assetslibrary/alassetslibrary/writeimagetosavedphotosalbum:orientation:completionblock:.md)
- [writeVideoAtPathToSavedPhotosAlbum:completionBlock:](assetslibrary/alassetslibrary/writevideoatpathtosavedphotosalbum:completionblock:.md)

### Type Methods

- [authorizationStatus](assetslibrary/alassetslibrary/authorizationstatus.md)
- [disableSharedPhotoStreamsSupport](assetslibrary/alassetslibrary/disablesharedphotostreamssupport.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

## See Also

### Classes

- [ALAsset](assetslibrary/alasset.md)
- [ALAssetRepresentation](assetslibrary/alassetrepresentation.md)
- [ALAssetsFilter](assetslibrary/alassetsfilter.md)
- [ALAssetsGroup](assetslibrary/alassetsgroup.md)
