0

I am getting the error in iOS 5.0.1 but working below the iOS 5.0.1 version.

the crash report is as follows: -

Hardware Model: iPad2,2

OS Version: iPhone OS 5.0.1 (9A405) Report Version: 104

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x00000000, 0x00000000 Crashed Thread: 0

Application Specific Information:

* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+entityForName: could not locate an NSManagedObjectModel for entity name 'PageDetail''

You can see my code,

#pragma mark iCarousel methods

- (NSUInteger)numberOfItemsInCarousel:(iCarousel *)carousel {
    NSFetchRequest *request = [[NSFetchRequest alloc] init];
    NSEntityDescription *entity = [NSEntityDescription entityForName:@"PageDetail" inManagedObjectContext:managedObjectContext];
    [request setEntity:entity];
    NSError *error = nil;
    NSMutableArray *mutableFetchResults = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy];
    if (mutableFetchResults == nil)
    {
        // Handle the error.
        //NSLog(@"mutableFetchResults == nil");
    }
    [self setPagesArray:mutableFetchResults];   
    [request release];
    [mutableFetchResults release];
    return [pagesArray count];
}

any help here would be appreciated and thanks you in advance.

Viraj
  • 1,880
  • 22
  • 31
Lion
  • 872
  • 1
  • 17
  • 43
  • As the error points out, there was no Model for `PageDetail` found. Are you sure that there is one? – tilo Feb 15 '12 at 13:06

1 Answers1

0

You should connect class owner view property with actual view you are presenting...

Borut Tomazin
  • 8,041
  • 11
  • 78
  • 91