---
title: PHPhotoLibrary
framework: photos
role: symbol
role_heading: Class
path: photos/phphotolibrary
---

# PHPhotoLibrary

An object that manages access and changes to the user’s photo library.

## Declaration

```swift
class PHPhotoLibrary
```

## Mentioned in

Editing Asset Content Delivering an Enhanced Privacy Experience in Your Photos App Fetching Assets Fetching Objects and Requesting Changes Observing Changes in the Photo Library

## Overview

Overview The object represents the entire set of assets and collections that the Photos app manages, including assets stored on the local device and those stored in iCloud Photos. Use this object for the following tasks: Retrieving or verifying the user’s permission for your app to access Photos content Making changes to assets and collections; for example, editing asset metadata or content, inserting new assets, or rearranging the members of a collection Determining which records change since a previous state of the Photos library Registering for update messages the system sends when the library changes

## Topics

### Verifying Authorization

- [authorizationStatus(for:)](photos/phphotolibrary/authorizationstatus(for:).md)
- [requestAuthorization(for:handler:)](photos/phphotolibrary/requestauthorization(for:handler:).md)
- [PHAccessLevel](photos/phaccesslevel.md)
- [PHAuthorizationStatus](photos/phauthorizationstatus.md)
- [authorizationStatus()](photos/phphotolibrary/authorizationstatus().md)
- [requestAuthorization(_:)](photos/phphotolibrary/requestauthorization(_:).md)

### Accessing the Shared Library

- [shared()](photos/phphotolibrary/shared().md)

### Presenting the Limited Library Picker

- [presentLimitedLibraryPicker(from:)](photos/phphotolibrary/presentlimitedlibrarypicker(from:).md)
- [presentLimitedLibraryPicker(from:completionHandler:)](photos/phphotolibrary/presentlimitedlibrarypicker(from:completionhandler:).md)

### Updating the Library

- [Requesting Changes to the Photo Library](photokit/requesting-changes-to-the-photo-library.md)
- [performChanges(_:completionHandler:)](photos/phphotolibrary/performchanges(_:completionhandler:).md)
- [performChangesAndWait(_:)](photos/phphotolibrary/performchangesandwait(_:).md)
- [PHChangeRequest](photos/phchangerequest.md)
- [PHAssetChangeRequest](photos/phassetchangerequest.md)
- [PHAssetCollectionChangeRequest](photos/phassetcollectionchangerequest.md)
- [PHCollectionListChangeRequest](photos/phcollectionlistchangerequest.md)
- [PHObjectPlaceholder](photos/phobjectplaceholder.md)

### Fetching Change History

- [fetchPersistentChanges(since:)](photos/phphotolibrary/fetchpersistentchanges(since:).md)
- [PHPersistentChangeFetchResult](photos/phpersistentchangefetchresult.md)
- [currentChangeToken](photos/phphotolibrary/currentchangetoken.md)
- [PHPersistentChangeToken](photos/phpersistentchangetoken.md)

### Observing Library Changes

- [Observing Changes in the Photo Library](photokit/observing-changes-in-the-photo-library.md)
- [register(_:)](photos/phphotolibrary/register(_:)-6y3b9.md)
- [unregisterChangeObserver(_:)](photos/phphotolibrary/unregisterchangeobserver(_:).md)
- [PHPhotoLibraryChangeObserver](photos/phphotolibrarychangeobserver.md)
- [PHChange](photos/phchange.md)
- [PHObjectChangeDetails](photos/phobjectchangedetails.md)
- [PHFetchResultChangeDetails](photos/phfetchresultchangedetails.md)

### Observing Library Availability

- [register(_:)](photos/phphotolibrary/register(_:)-gm0a.md)
- [unregisterAvailabilityObserver(_:)](photos/phphotolibrary/unregisteravailabilityobserver(_:).md)
- [PHPhotoLibraryAvailabilityObserver](photos/phphotolibraryavailabilityobserver.md)
- [unavailabilityReason](photos/phphotolibrary/unavailabilityreason.md)

### Converting Between Local and iCloud Identifiers

- [cloudIdentifierMappings(forLocalIdentifiers:)](photos/phphotolibrary/cloudidentifiermappings(forlocalidentifiers:).md)
- [localIdentifierMappings(for:)](photos/phphotolibrary/localidentifiermappings(for:).md)
- [PHCloudIdentifier](photos/phcloudidentifier.md)
- [cloudIdentifiers(forLocalIdentifiers:)](photos/phphotolibrary/cloudidentifiers(forlocalidentifiers:).md)
- [localIdentifiers(for:)](photos/phphotolibrary/localidentifiers(for:).md)
- [PHLocalIdentifierNotFound](photos/phlocalidentifiernotfound.md)

### Enabling an Upload Job Extension

- [uploadJobExtensionEnabled](photos/phphotolibrary/uploadjobextensionenabled.md)
- [setUploadJobExtensionEnabled(_:)](photos/phphotolibrary/setuploadjobextensionenabled(_:).md)

### Instance Methods

- [localIdentifierMappings(forSynced:)](photos/phphotolibrary/localidentifiermappings(forsynced:).md)
- [register(_:)](photos/phphotolibrary/register(_:)-7lhue.md)
- [unregisterPersistentChangesObserver(_:)](photos/phphotolibrary/unregisterpersistentchangesobserver(_:).md)

## Relationships

### Inherits From

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

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
