---
title: "register(_:)"
framework: photos
role: symbol
role_heading: Instance Method
path: "photos/phphotolibrary/register(_:)-6y3b9"
---

# register(_:)

Registers an object to receive messages when objects in the photo library change.

## Declaration

```swift
func register(_ observer: any PHPhotoLibraryChangeObserver)
```

## Parameters

- `observer`: An object for receiving change messages.

## Mentioned in

Observing Changes in the Photo Library

## Discussion

Discussion You implicitly declare interest in change messages whenever you use a fetch method (such as fetchAssets(with:)) to retrieve assets or collections. After you perform a fetch, Photos automatically sends change messages whenever the objects in the resulting fetch request change—including when changes happen that add to, remove from, or reorder the list of objects in the fetch result.

## See Also

### Observing Library Changes

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