简体   繁体   English

iPhone照片库中照片的唯一标识符

[英]Unique identifier of photos in iPhone photo library

I am going to develop an app that will basically work as a catalogue for the photos taken from an iPhone app (saved in photo library). 我将开发一个应用程序,该应用程序基本上可以用作从iPhone应用程序(保存在照片库中)拍摄的照片的目录。 I am thinking about creating an SQLite database (catalogue) and mapping it to photos in the photo library (correct me if this approach is wrong). 我正在考虑创建一个SQLite数据库(目录)并将其映射到照片库中的照片(如果这种方法不正确,请纠正我)。

What would be the best way to map the photos and the SQLite database? 映射照片和SQLite数据库的最佳方法是什么?

I want to avoid the case that user changes name of the file and link between file and DB doesn't work anymore. 我想避免用户更改文件名并且文件与数据库之间的链接不再起作用的情况。

You can store photos in Base63 string into your SQLite database. 您可以将照片以Base63字符串存储到SQLite数据库中。

And for the Unique identifier of photos you can user imagename_curentUnixTimestamp.jpg . 对于照片的唯一标识符,您可以使用imagename_curentUnixTimestamp.jpg

you can use current date and time to give a name of photo and store it document directory. 您可以使用当前日期和时间来命名照片,并将其存储在文档目录中。 also save name of photo into database.when required load photo from document directory as per it's name stored in db. 还可以将照片的名称保存到数据库中。需要时,可以按照存储在数据库中的名称从文档目录中加载照片。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM