fathik
fathik

Reputation: 346

Error in coredata?

I am developing an app that saving an url using coredata.I am defining NSManagedObjectContext,NsManagedObjectModel,NSPersistentStoreCoordinator in CoreDataRepository object class instead of AppDelegate.I am saving this url using reference of CoreDataRepository.I am getting below error.

Undefined symbols for architecture i386:
   "_OBJC_CLASS_$_CoreDataRepository", referenced from:
      objc-class-ref in HomeViewController.o
      objc-class-ref in DashBoardUrlViewController.o
    ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any idea about this error.Thanks.

Upvotes: 2

Views: 118

Answers (1)

Phillip Mills
Phillip Mills

Reputation: 31016

The linker can't find your CoreDataRepository class. Look in your target's Build Phases and add that source or library to either the compile or link phase, depending on where it's defined.

Upvotes: 2

Related Questions