FetchRequests for photos not in albums, pagination

I'm looking for a way to get photos not in user created albums, and the best I've come up with is to fetch all the assets, then get all the collections, then filter based on that.


Is there a shorthand I'm missing?


Second to that, is there a way to paginate photos entries? I guess I can keep doing fetches by creation date, but I can't supplement fetches.

Replies

let tempsharedalbums = PHAssetCollection.fetchAssetCollections(with: PHAssetCollectionType.album, subtype: PHAssetCollectionSubtype.albumCloudShared, options: nil) tempsharedalbums.enumerateObjects { (collection, index, p) in let assetsinalbum = PHAsset.fetchAssets(in: collection, options: nil) // do something with the assets }

Maybe not exactly what you asked but this gets shared albums, then fetches assets from those albums.