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 9294595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:24:34+00:00 2026-06-18T21:24:34+00:00

I have a NSMutableDictionary holding EXIF metadata from a picture. An example: const CFStringRef

  • 0

I have a NSMutableDictionary holding EXIF metadata from a picture.
An example:

const CFStringRef kCGImagePropertyExifExposureTime;

Instead of accessing every key individually, I just want write the whole dictionary content into a label.
When I want to write this data into the console I would just use:

NSLog(@"EXIF Dic Properties: %@",EXIFDictionary );

That works fine, but if I use:

NSString *EXIFString = [NSString stringWithFormat:(@"EXIF Properties: %@", EXIFDictionary)];

I get warnings that the result is not a string literally and if I try to use that string to set my label.text, the program crashes.

Any idea where my error is?

  • 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-06-18T21:24:36+00:00Added an answer on June 18, 2026 at 9:24 pm

    [NSString stringWithFormat:(@"EXIF Properties: %@", EXIFDictionary)] is not, as you may think, a method with two arguments. It’s a method with one argument. That one argument is (@"EXIF Properties: %@", EXIFDictionary), which uses the comma operator and ends up returning EXIFDictionary. So in essence you have

    [NSString stringWithFormat:EXIFDictionary]
    

    which is obviously wrong. This is also why you’re getting a warning. That warning tells you that the format argument is not a string literal, because using variables as format strings is a common source of bugs. But more importantly here, that argument isn’t even a string at all, and so it crashes.

    Remove the parentheses and everything will be fine. That will look like

    [NSString stringWithFormat:@"EXIF Properties: %@", EXIFDictionary];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an NSMutableDictionary with some song data (for example key: Artist object: Passion
I have a NSMutableDictionary with string keys and every key has its own array.
I have a NSMutableDictionary with the key being the first alphabet of the name
I have a NSMutableArray (tripHistory) that gets a NSMutableDictionary (currentUpdate) added to it every
I have an NSMutableDictionary with three key/value pairs. key1 - person object1 key2 -
I have an NSMutableDictionary with 10 objects each with a key of course, the
I want to have a NSMutableDictionary that will pull it's data from the web,
I have a UITableView which is populated by the array keys from an NSMutableDictionary.
I have a NSMutableDictionary of NSMutableSets. Each set entry is a string, something like
I am having a bit of a issue. I have an NSMutableDictionary with 10

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.