简体   繁体   中英

How to know file in iOS app bundle has been modified on next update?

I take the png file stored in app bundle of my iOS app and process it. After that I save it in document directory. I need to reprocess the same file and replace it with the previous one if the file has any change when I push my next update to appStore. Basically I need a versioning of file to know whether any change has happened on every app updates.

I tried comparing the time created of the file using the struct stat st_ctime. But it returns the time when the app is installed on the device. Also taking the st_size doesn't seems to be a smart move.

I am using c++ to develop my app and uses cocos2dx framework.

Could anyone help me on this?

The files in app bundle are readonly, so you have the original version. And if you want to know if it is edited the copy in documents directory you can just compare them.

You can compare the data, checksum or last modification date.

How to get last modification date:

Retrieve file creation or modification date

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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