Roy Quesada
Roy Quesada

Reputation: 43

get the last modified date from ALAsset (Video) iOS Video

How would I 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.

Upvotes: 4

Views: 1245

Answers (1)

Deepesh Gairola
Deepesh Gairola

Reputation: 1242

In ALAsset Class reference there is no such property for Last updated date how ever there is a property for Created date

ALAsset* asset;
NSDate* date = [asset valueForProperty:ALAssetPropertyDate];

Upvotes: 4

Related Questions