开发者

Filter camera roll, in order to upload only specified pictures

开发者 https://www.devze.com 2023-02-17 20:48 出处:网络
My app generates pictures from iphone camera. I have an upload feature in-app. I want the user to be able to upload through my app, only the pictures generated by it.

My app generates pictures from iphone camera. I have an upload feature in-app. I want the user to be able to upload through my app, only the pictures generated by it.

So far, i found 2 ways of doing it :

record and store assetURL in a DB for comparison or write my own me开发者_StackOverflow社区tadata in user_comment in EXIF. And retrieve it with assetForURL.

I prefer the second option but it seems that it works only if the user allows geotaging ?!! This type of thing could scare the client don't you think ?

Any idea about how to deal with this problem ?


You probably have a class that is associated with the images you create. How about using the [NSObject hash] method to generate a unique ID (as unique as you need, anyway) for each image and write that to an EXIF field you can check? The unique nature of the ID isn't something you need to care about for now, just that there is a value there. Why not make a string like "MyAppName#" and put it in user_comment?

Seems like MakerNote might be a good tag to use - "a tag for manufacturers of Exif writers to record any desired information. The contents are up to the manufacturer, but this tag should not be used for any other than its intended purpose."

Later you might find the unique nature of the tag useful.

I don't see the second option that would require geotagging?

0

精彩评论

暂无评论...
验证码 换一张
取 消