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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:36:28+00:00 2026-05-24T15:36:28+00:00

I have a .plist file that is loaded into my Xcode project. I have

  • 0

I have a .plist file that is loaded into my Xcode project. I have successfully put it in the documents directory of my iPhone while testing it. When I dump the contents into an NSMutableDictionary, and try to enumerate it, I get EXC_BAD_ACCESS crashes. They keys all have BOOLs associated as their values. What am I doing wrong?

My code now:

for (id key in achDict) {

    NSLog(@"Achievement:%@ done:%@", key, [[achDict objectForKey:key] boolValue]);

}

This always returns EXC_BAD_ACCESS in a crash.

  • 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-24T15:36:29+00:00Added an answer on May 24, 2026 at 3:36 pm

    Your NSLog is expecting two objects but you are passing it a string ‘key’ and an Integer. A Bool Value is not an Object, it returns an Integer value (0 for False and 1 for True). %@ is for Objective C Objects. Instead use %d to get Integer Values such as C Booleans.

    Change your NSLog statement to:

    NSLog(@"Achievement:%@ done:%d", key, [[achDict objectForKey:key] boolValue]);
    

    Apple’s String Programming Guide has a useful section on String Modifiers

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

Sidebar

Related Questions

I have successfully created an app that reads from a bundled .plist file and
I have just noticed, that if you have an .plist file in your Xcode
In Objective-C xcode project I have a plist file with which associates integers with
I have a plist file that is brought into a tableview, and now want
So I have a plist structured string, that get dynamically (not from the file
I have a plist file in my resources group in xcode. I am trying
I have a .plist file that looks like this: <plist version=1.0> <array> <dict> <key>name</key>
I have a plist file that I am reading out a measurement, but some
In my Iphone application i have .plist file in which i am putting all
I'm implemanting in an iphone app a .plist file that contain some initial parameters

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.