HOW TO GET LAST MODIFIED DATE USING ALASSET CLASS IN IOS

Mark Devid

Total Post:102

Points:714
Posted by  Mark Devid
 650  View(s)
Ratings:
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.
  1. Tarun Kumar

    Post:214

    Points:1642
    Re: How to get last modified date using ALAsset class in iOS

    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];

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!