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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:59:27+00:00 2026-06-06T04:59:27+00:00

I am attempting to get a count of items in an array to place

  • 0

I am attempting to get a count of items in an array to place it in the right detail of a cell. Interestingly enough I am getting the proper count but my when I try to NSLog the array it returns <fault>.

NSPredicate *searchPredicate = [NSPredicate predicateWithFormat:@"muscleGroup == %@ && specificExercise == %@ && date >= %@ && date < %@", theMuscleGroup, theExercise, fromDate, toDate];

NSFetchRequest *fetchRequestTemp = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription
                               entityForName:@"WeightLiftingInfo" inManagedObjectContext:_managedObjectContext];

[fetchRequestTemp setPredicate:searchPredicate];
[fetchRequestTemp setEntity:entity];
NSError *error;
NSArray *tempArray = [[NSArray alloc] initWithArray:[_managedObjectContext executeFetchRequest:fetchRequestTemp error:&error]];

NSLog(@"%@", tempArray);
NSLog(@"%d", [tempArray count]);

My Question:
Basically, what am I doing wrong? Am i initing the array improperly or trying to log it improperly?

I have been researching for hours and trying different coding, but cannot figure it out. Any help would be appreciated. If you need more info or I am doing something against guidelines according to SO please let me know before you close this thread or “-1”. HAVE MERCY, I am new and leaning:)

  • 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-06T04:59:29+00:00Added an answer on June 6, 2026 at 4:59 am

    When you execute your fetch request, you get back a managed object fault. That is, a proxy-like object that represents the results even though the real data objects haven’t been loaded from the data store yet. The fault knows how many objects are in the array, etc., and when you access the objects the fault will transparently load the real objects.

    So, situation normal, don’t worry about it. Try using the results instead of logging them and I think you’ll find that things work fine.

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

Sidebar

Related Questions

I'm pretty novice at MYSQL, but I'm attempting to get a count from a
I am attempting to use a case statement but keep getting errors. Here's the
I am attempting to get the information from one table (games) and count the
Attempting to get distinct count value back of the number threads in a query
Attempting to get Spring internationalization working. I have used classpath:messages basename, created .properties files
Im attempting to get a block of text from a file I have already
I'm attempting to get rid of an app's HTML files and store their contents
I´ve been attempting to get a polar plotting in a PolarChart using MSchart, and
I am attempting to get rails routes paths via nested resources. I have looked
I'm attempting to get order data from a Yahoo store. I'm using the docs

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.