Skip to content
Branch: master
Go to file

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time


Read and write images metadata using ImageIO and easy to use models.


    // load metadata from original file
    SYMetadata *metadata = [SYMetadata metadataWithFileURL:imageURL];
    // create IPTC container if not present
    if (!metadata.metadataIPTC)
        metadata.metadataIPTC = [[SYMetadataIPTC alloc] init];
    // edit metadata
    metadata.metadataIPTC.keywords  = @[@"Some test keywords", @"added by SYMetadata example app"];      = @"Lyon";    = @"© Me 2017";
    // create new image data with original image data and edited metadata
    NSData *data = [NSData dataWithContentsOfURL:imageURL];
    NSData *dataWithMetadata = [SYMetadata dataWithImageData:data andMetadata:metadata];
    // load metadata for newly cerated image
    SYMetadata *metadataNew = [SYMetadata metadataWithImageData:dataWithMetadata];
    // log the delta in file size
    NSLog(@"Delta: %ld bytes", (unsigned long)dataWithMetadata.length - (unsigned long)data.length);
    // log the differences between files
    NSLog(@"Differences:\n%@", [NSDictionary sy_differencesFrom:metadata.originalDictionary

Keep in mind

When saving metadata to a file you can encouter the following issues:

  • metadata was not written
  • metadata was modified a bit
  • metadata was added

This library uses ImageIO which has its own limitations and performs its own value checks. This is just a wrapper around the NSDictionary structure this framework exposes and is not perfect. Please heavily test your app if you use this library to edit metadata, a set of test images for tests can be found in the example app (currently testing around 216 keys out of 314 supported on iOS 10.2). This library DOES NOT garantee data integrity like libexif or exiv2 would.


Metadata copy

Metadata editing

Data set analysis

Metadata preview


You'll find links that helped me a lot in comments inside this library where appropriate. Mainly:

Credits to chrfb ( for the beautiful icons I used in the tab buttons.


Use it as you like in every project you want, redistribute with mentions of my name and don't blame me if it breaks :)

-- dvkch


Read/write EXIF and other metadata



You can’t perform that action at this time.