Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6938107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:27:01+00:00 2026-05-27T12:27:01+00:00

I want to retrive a value from a NSDictionary. Here is a snippet of

  • 0

I want to retrive a value from a NSDictionary.

Here is a snippet of code:

NSDictionary *metadataDict = [representation metadata]; 
NSLog(@"%@",metadataDict);

“DateTimeOriginal” is the value I want to retrieve from the following output.

{
ColorModel = RGB;
DPIHeight = 72;
DPIWidth = 72;
Depth = 8;
Orientation = 6;
PixelHeight = 1936;
PixelWidth = 2592;
"{Exif}" =     {
    ApertureValue = "2.970854";
    ColorSpace = 1;
    ComponentsConfiguration =         (
        1,
        2,
        3,
        0
    );
    DateTimeDigitized = "2011:09:28 09:35:36";
    DateTimeOriginal = "2011:09:28 09:35:36";
    ExifVersion =         (
        2,
        2,
        1
    );
    ExposureMode = 0;
    ExposureProgram = 2;
    ExposureTime = "0.06666667";
    FNumber = "2.8";
    Flash = 24;
    FlashPixVersion =         (
        1,
        0
    );
    FocalLength = "3.85";
    ISOSpeedRatings =         (
        320
    );
    MeteringMode = 5;
    PixelXDimension = 2592;
    PixelYDimension = 1936;
    SceneCaptureType = 0;
    SensingMethod = 2;
    Sharpness = 2;
    ShutterSpeedValue = "3.9112";
    SubjectArea =         (
        1295,
        967,
        699,
        696
    );
    WhiteBalance = 0;
};
"{GPS}" =     {
    Latitude = "37.54216666666667";
    LatitudeRef = N;
    Longitude = "126.95";
    LongitudeRef = E;
    TimeStamp = "01:19:05.00";
};
"{TIFF}" =     {
    DateTime = "2011:09:28 09:35:36";
    Make = Apple;
    Model = "iPhone 4";
    Orientation = 6;
    ResolutionUnit = 2;
    Software = "4.3.5";
    XResolution = 72;
    YResolution = 72;
    "_YCbCrPositioning" = 1;
};

}

I know it’s long but I tried these three and it still would not work.

NSLog(@”valueForKey %@”, [metadataDict valueForKey:@”DateTimeOriginal”]);
NSLog(@”valueForKeyPath %@”, [metadataDict valueForKeyPath:@”DateTimeOriginal”]);
NSLog(@”objectForKey %@”, [metadataDict objectForKey:@”DateTimeOriginal”]);

Does anyone know what kind of datatype is in the NSDictionary and how I can retrieve it?

Thanks much.

Above project link:
http://dl.dropbox.com/u/12439052/TheK2.zip

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:27:01+00:00Added an answer on May 27, 2026 at 12:27 pm

    What you’re really looking for is

    NSDictionary *exif = [metadataDict objectForKey:@"{Exif}"];
    NSLog(@"DateTimeOriginal: %@", [exif objectForKey:@"DateTimeOriginal"]);
    

    If you read the output from your first log, you’ll see that the key you want is actually inside another dictionary which has the key "{Exif}". Also, -objectForKey: is the better method here to use rather than -valueForKey: (the latter is for generic KVO, the former is the real dictionary object accessor).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to retrieve values from SQLite database in my Android application. Here in
i have a NSString instance ,i want to retrieve value from it and store
basically i want to hold a parameter that retrieve value from $.post() call like
I want to retrieve array value. This is my array value: overlay.txt: {title:sss,description:sss,code:sss} {title:trtr,description:trtr,code:tyrytr}
When I retrieve any Scalar value from the database, I usually write code like
I want to retrieve the value from the URL. My URL looks like: http://www.test.com/questions/gradename/
Hello I want to retrieve a value from the uri and use it in
We want to retrive penality from Xml tables on WebService. Our code reads the
I have a HTML table as follows. I want retrieve row values from this
I want to retrive files with extension of .jpg from directory in vc++ 08.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.