PhotoKit - non-system library

Hi, I'm wondering if it is possible to manipulate the "other" Photos library with PhotoKit, not the only System one.
PhotoKit documentation only mentioned object of PHPhotoLibrary class, which is "a shared object that manages access and changes to the user’s shared photo library". But the Photos app in macOS allows to create and switch between multiple photo libraries.
Thanks.
Post not yet marked as solved Up vote post of 9nines Down vote post of 9nines
661 views

Replies

I have the same question. My motivation is testing: I’d like to write an app against PhotoKit, and I’ve been thinking about how I’d test the app. I’d need to test different cases with different “states” of the library. I suppose I could add/remove assets to/from the shared library to get it into the expected “before” state for each test, but that would preclude running my tests concurrently.

Is there any way to create and work with alternate photo libraries programmatically? Ideally, concurrently?

Same, I was wondering if it's possible to load and manage a photo library (basically a non-System Photo Library) by passing a file path URL. Based on the lack of responses, seems like there's no way to do this.