I am a new guy to iOS. Recently, I am developing an iOS application need to check image (in iOS Photos) created date time and modified date time to sort these images by time. I used ALAssetsLibrary to enumerate all images, i can get following attributes of each image: image file name, image asset url (within it, i can get image file extension and unique asset id). But could someone tell me how to get the image file created date time and last modified date time?
Thanks very much.
You can retrieve the creation date of the asset using the ALAssetPropertyDate property:
ALAsset* asset;
...
NSDate* date = [asset valueForProperty:ALAssetPropertyDate];
I'm not sure of a method to retrieve the last modified date.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With