error [PHPhotosErrorDomain] -1: The operation couldn’t be completed. (PHPhotosErrorDomain error -1.)

If you're seeing PHPhotosErrorDomain error -1 after attempting to add an image to Simulator via xcrun simctl addmedia <simulatorID> image.jpeg it might be because the image.jpeg is in a folder that is synced to your iCloud Drive.

Just copy the file to some other folder (which is not synced to iCloud Drive 😁) and add the media from there.