1

Say I have a video or even a photo stored in my iPhones's camera roll(the Photos app).

  1. I save it to Files(inside a folder)
  2. Connect the phone to my Mac
  3. Copy the enclosing folder using the Finder>iPhone>Files tab
  4. Now I have the file on my computer

Now... lets do the same, but with AirDrop

  1. Select the file from the Photos app
  2. Airdrop to my Mac.
  3. Now I have a second copy of the file on my computer

On first glance they look the same: same name and the byte count is(for the most part) the exact same. But, if I compare the two files with the command 'diff' it says they are different. Using an application to compare files byte-by-byte reveals that the top part, the header, is what differs. The files will be 99% the same. Does anyone know the specifics of how Airdrop and copying to Files causes the difference?

There are also cases where the files differ in byte count. I would like to find a way to identify these duplicates and delete them.

Ios version: 15.5

Iphone XS max

thx

1 Answer 1

1

AirDrop adds some extended attributes to incoming files, including the Quarantine attribute and the AirDrop ID of the sender. I don't know of any way to remove them on a phone, but on a Mac you would do something like this in the shell:

xattr -c file1 [file2 ...]

This will remove all extended attributes, not just the added ones. If you want to preserve the attributes not added by AirDrop, you'll have to be more selective and run a more complex command.

As for eliminating duplicates, the Photos app on a Mac can do that with your iCloud library, which will also take care of any other devices that sync with it. For other files, you would either need to again use the shell or a third-party utility.

Update: There is a Sharing option in Photos to send “All Photos Data” via Airdrop. It’s off by default. Please check.

2
  • I had already tried that and diff still says files differ :(
    – Kenshiro
    Commented Nov 3 at 21:07
  • See my updated answer.
    – Linc Davis
    Commented Nov 3 at 22:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .