Home > DeveloperSection > Forums > How to get last modified date using ALAsset class in iOS
Mark Devid
Mark Devid

Total Post:102

Posted on    December-20-2015 4:21 AM

 iPhone iPhone  Ios  Objective C 

 1 Reply(s)
 634  View(s)
Rate this:
I want to get the last modified date from ALAsset type video?
I tried with:
NSDate *date = [dateFormatter dateFromString:[[[[asset defaultRepresentation] metadata] objectForKey:@"{TIFF}"] objectForKey:@"DateTime"]];
but metadata is coming empty for a video.
Please help me.

Tarun Kumar

Total Post:214

Posted on    December-20-2015 11:22 PM

I have searched there is no such property for finding last updated date how ever there is a property for Created date.
For getting created date use code like this:

ALAsset* assetObj;
NSDate* dateObj = [assetObj valueForProperty:ALAssetPropertyDate];

Don't want to miss updates? Please click the below button!

Follow MindStick