Skip to content

[CRASH] Both test apps crash on startup in NSPersistentStoreCoordinator #24

@danieltiger

Description

@danieltiger

This is on my laptop, I don't know if I have the same problem at work but I get the following error when I try and run either test app:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot create an NSPersistentStoreCoordinator with a nil model'

I traced it back to:

NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"PilotTestApp" withExtension:@"momd"];
__managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];

modelURL is nil for some reason. I tried changing that code to the more accepted:

[NSManagedObjectModel mergedModelFromBundles:nil];

Which solved the nil problem but then it crashed because it couldn't find an entity named redObject.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions