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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:09:59+00:00 2026-05-24T09:09:59+00:00

here is my function for fetching core data – (void)fetchRecords { // Define our

  • 0

here is my function for fetching core data

- (void)fetchRecords {   

    // Define our table/entity to use  
    NSEntityDescription *entity = [NSEntityDescription entityForName:@"Fugitive" inManagedObjectContext:managedObjectContext];   

    // Setup the fetch request  
    NSFetchRequest *request = [[NSFetchRequest alloc] init];  
    [request setEntity:entity];   

    // Define how we will sort the records  
    NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:NO];  
    NSArray *sortDescriptors = [NSArray arrayWithObject:sortDescriptor];  
    [request setSortDescriptors:sortDescriptors];  
    [sortDescriptor release];   

    // Fetch the records and handle an error  
    NSError *error;  
    NSMutableArray *mutableFetchResults = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy];   

    if (!mutableFetchResults) {  
        NSLog(@"Error in Fetching Result");
        // Handle the error.  
        // This is a serious error and should advise the user to restart the application  
    }

    // Save our fetched data to an array
    [self setFugitiveArray: mutableFetchResults];
    [mutableFetchResults release];
    [request release];
}

i got following error while running the program ‘Program received signal: “SIGABRT”‘

iBountyHunter[1013:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+entityForName: could not locate an NSManagedObjectModel for entity name 'Fugitive''
*** Call stack at first throw:
(
    0   CoreFoundation                      0x011005a9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x01254313 objc_exception_throw + 44
    2   CoreData                            0x00e2aebb +[NSEntityDescription entityForName:inManagedObjectContext:] + 187
    3   iBountyHunter                       0x000030e6 -[FugitiveListViewController fetchRecords] + 86
    4   iBountyHunter                       0x00003411 -[FugitiveListViewController viewDidLoad] + 289
    5   UIKit                               0x00375f26 -[UINib instantiateWithOwner:options:] + 1556
    6   UIKit                               0x00377ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
    7   UIKit                               0x0017d17a -[UIApplication _loadMainNibFile] + 172
    8   UIKit                               0x0017dcf4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291
    9   UIKit                               0x00188617 -[UIApplication handleEvent:withNewEvent:] + 1533
    10  UIKit                               0x00180abf -[UIApplication sendEvent:] + 71
    11  UIKit                               0x00185f2e _UIApplicationHandleEvent + 7576
    12  GraphicsServices                    0x01c48992 PurpleEventCallback + 1550
    13  CoreFoundation                      0x010e1944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    14  CoreFoundation                      0x01041cf7 __CFRunLoopDoSource1 + 215
    15  CoreFoundation                      0x0103ef83 __CFRunLoopRun + 979
    16  CoreFoundation                      0x0103e840 CFRunLoopRunSpecific + 208
    17  CoreFoundation                      0x0103e761 CFRunLoopRunInMode + 97
    18  UIKit                               0x0017d7d2 -[UIApplication _run] + 623
    19  UIKit                               0x00189c93 UIApplicationMain + 1160
    20  iBountyHunter                       0x00002519 main + 121
    21  iBountyHunter                       0x00002495 start + 53
)
terminate called after throwing an instance of 'NSException'
  • 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-24T09:10:00+00:00Added an answer on May 24, 2026 at 9:10 am

    if you have declare in app delegate then you should check it like :

    if (managedObjectContext == nil) 
    { 
            managedObjectContext = [(YourAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext]; 
            NSLog(@" %@",  managedObjectContext);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my problem. Given that I am saving data in an array: fetch.on('message', function(msg)
Is it possible to have default arguments in MATLAB? For instance, here: function wave(a,
Here is function , <script type=text/javascript> $(document).ready(function() { getRecordspage(1, 5); $(a.page-numbers).click(function() { alert(1); getRecordspage($(this).text(),
$('#selector').click(function() { // here I would like to load a javascript file // let's
Someone posted a great little function here the other day that separated the full
I've got a function here that is meant to look through a list of
simonn helped me to code an ordered integer partition function here. He posted two
I have this simple function: <script type=text/javascript> //<![CDATA[ jQuery(function($){ function here(b){alert(b);} ; here(6); });
I need to pass an url from asp.net load_page to flowplayer javascript function here:
Here is my function ( updated ): Public Shared Function shortenUrl(ByVal URL As String)

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.