How to recognize whether an asset (photo or video) is created by the device itself?

Hello.


I am developing an app that can backup assets (photos and videos) in iPhone to a server.

I want to backup assets taken by the iPhone itself only. But Photos Framework enumerates assets taken by not only the iPhone itself but also other iPhones (via photo stream or iCloud photo library).


My question is:

How to recognize whether an asset (photo or video) is created by the device itself ?


I tried PHImageResultIsInCloudKey flag, but its value seems to be changed by some complicated conditions and it sometimes indicates YES even if an asset may be in local storage.

Replies

It's not possible using current APIs. Before iOS 8 was released, I remember there was some property in early betas, but it was removed later on.

Dear hhtouch,


Thank you for reply.


I hope that we can get more properties from the future APIs.

Also, please tell me a good way if anyone knows.

Did you try sniffing the EXIF data?


Example: let kCGImagePropertyExifCameraOwnerName: CFString


Meta data/keys list is here: EXIF Dictionary Keys