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

  • Home
  • SEARCH
  • 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 8949065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:09:08+00:00 2026-06-15T13:09:08+00:00

Okay, so I already tried the examples on apple’s SDK developer pages and it

  • 0

Okay, so I already tried the examples on apple’s SDK developer pages and it didn’t work. I tried the examples from previous questions on stackoverflow like :

NSEntityDescription  entitydesc = [NSEntityDescription entityForName:@"Model" inManagedObjectContext:context];
NSFetchRequest request = [[NSFetchRequest alloc]init];
[request setEntity:entitydesc];

//tried this style of predicate

NSPredicate *predicate = [NSPredicate predicateWithFormat:@"accessible == %@", [NSNumber numberWithBool:YES]];

//and this one

NSPredicate *predicate = [NSPredicate predicateWithFormat:@"accessible == YES"];
[request setPredicate: predicate];

NSError *error;
NSArray *matchingData = [context executeFetchRequest: request error: &error];

both of which didn’t work. In debugger the matchingData shows 0 objects when it should have many.

All my other fetchrequests have worked perfectly fine. This is the only one giving me problems.

The attribute is listed as type Boolean in the .xcdatamodel

The attribute is listed as this under the entity’s header file:

@property (nonatomic, retain) NSNumber * accessible;

The data was entered into the core data database as follows:

NSNumber *accessibleFieldValue  = [NSNumber numberWithBool:YES];
[newModel setValue: accessibleFieldValue forKey:@"accessible"];

I’ve checked and there are no nil values entered in the sqlite database.

What should I do?

  • 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-15T13:09:09+00:00Added an answer on June 15, 2026 at 1:09 pm

    I ended up going to the database in sqlite database browser and changing the type for the field value to Numeric. For some reason core data entered the data as an incompatible data type…..don’t really know why, but I have a feeling this might be an Xcode bug. As I said, it works now after I changed the field type. I don’t think I will be using boolean values in core data any time soon…..at least not until I understand why this was a problem.

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

Sidebar

Related Questions

Okay, I've already asked 2 questions about my problem and despite the fact that
Okay i have already been through most of the ati and nvidia guides to
Okay, so the issue I'm being stuck at for few days already is that
I am using Simple example from the Facebook SDK just to get the user
Okay, so I already have a script to let users enter tags but I
Okay, I'm pulling data from an XML file to populate my elements of my
Okay so I've tried to look this up so it isn't a duplicate but
I tried profiling my application with OProfile recently. The data gathered is already very
Okay I'm trying to convert MySQL request to PDO MySQL. I already do that
Okay, so I already have a Pipe where I extracted the string I need

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.