PHAssetCollectionChangeRequest.removeAssets Does Not Work

Hello!

I am trying to remove a photo from my Photos Library using PhotosUI. I run into this error when I attempt to delete it:

"Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)"" No photos access scope requirements declared for changes Failed to log access with error: access= accessor:<> identifier:82068C12-FD10-4DE2-9867-B4406FBFB706 kind:intervalEvent timestampAdjustment:0 visibilityState:0 assetIdentifierCount:0 accessCount:0 tccService:kTCCServicePhotos, error=Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.privacyaccountingd" UserInfo={NSDebugDescription=connection to service named com.apple.privacyaccountingd}

Answered by DTS Engineer in 813883022

Hello @Oranges,

I am trying to remove a photo from my Photos Library using PhotosUI.

It looks like you are using PHAssetCollectionChangeRequest.removeAssets, which is intended for removing assets from a collection.

To remove assets from the Photo Library, use deleteAssets(_:).

Best regards,

Greg

Hello @Oranges,

I am trying to remove a photo from my Photos Library using PhotosUI.

It looks like you are using PHAssetCollectionChangeRequest.removeAssets, which is intended for removing assets from a collection.

To remove assets from the Photo Library, use deleteAssets(_:).

Best regards,

Greg

PHAssetCollectionChangeRequest.removeAssets Does Not Work
 
 
Q