iOS Create a Unique Identifier for Pictures

1k views Asked by At

I want to import pictures from the photo library on iOS but I want to check that I haven't already done so in the past.

What can I use as a unique identifier to check for?

What I thought so far are these:

  1. Created Date ( This might have a low probability of conflict, might have pictures taken at the same time or saved at the same time by iphoto)
  2. Pictures filesize (Depending on how accurate I can get this number)
  3. A combination of the two?
  4. Exif Data? (Works well for pictures taken but what if you have images with no Exif?)

What are you using?

Thanks

1

There are 1 answers

1
chritaso On

Something I used when I had a problem like this was the MD5-Hash of the combination of date (in this case unix timestamp) and filename. I think this should be unique.