addAssets(_:)
addAssets(_:)
addAssets(_:) Instance Method of PHAssetCollectionChangeRequest Adds the specified assets to the asset collection.
func addAssets(_ assets: any NSFastEnumeration)Parameters
assets
An array of PHAsset objects to be added to the asset collection.
Discussion
If you created the change request with a snapshot of the asset collection’s contents using the init(for:assets:)) method, Photos inserts the new assets after the existing assets in the collection. Otherwise, the arrangement of the new assets relative to others in the collection is undefined.
Note: Assets from My Photo Stream or iCloud Shared Albums and assets synced to the device through iTunes cannot be added to collections. Transient asset collections (such as those created with the `
doc://com.apple.photokit/documentation/Photos/PHAssetCollection/transientAssetCollection(with:title:)` method) do not support adding or removing content.