<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHPhotoLibrary/register(_:)-7lhue",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHPhotoLibrary(im)registerPersistentChangesObserver:"
  },
  "title" : "register(_:)"
}
-->

# register(_:)

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

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

## Discussion

The observer is held weakly by the photo library. The observer’s [`photoLibraryPersistentChangesDidUpdate(_:)`](/documentation/Photos/PHPhotoLibraryPersistentChangesObserver/photoLibraryPersistentChangesDidUpdate(_:)) method
is called on an arbitrary serial queue when changes are committed to the photo library. Use
[`fetchPersistentChanges(since:)`](/documentation/Photos/PHPhotoLibrary/fetchPersistentChanges(since:)) to retrieve the specific changes.

Requires read-write photo library authorization ([`PHAccessLevel.readWrite`](/documentation/Photos/PHAccessLevel/readWrite)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)