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

# register(_:)

Registers an observer to be notified when persistent changes occur in the photo library.

## Declaration

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

## Discussion

Discussion The observer is held weakly by the photo library. The observer’s photoLibraryPersistentChangesDidUpdate(_:) method is called on an arbitrary serial queue when changes are committed to the photo library. Use fetchPersistentChanges(since:) to retrieve the specific changes. Requires read-write photo library authorization (PHAccessLevel.readWrite).
