Pavan
Pavan

Reputation: 18518

Cannot find protocol declaration NSFetchedResultsController

I don't understand why errors persist despite what I believe to having correctly imported the required files and frameworks. The core data staple code fits nicely in the AppDelegate, but when I now want to use the NSFetchedResultsController in my custom ViewController I get shown these errors shown below:

enter image description here

Here are the frameworks added thus far.

enter image description here

Without importing the files in my custom viewcontroller, I tried to fixate the importing the Prefix-h file in the ifdef section as shown below and still the error is thrown.

enter image description here

Can someone pls suggest whats going on?

Upvotes: 0

Views: 464

Answers (1)

Buntylm
Buntylm

Reputation: 7373

As reviewed you using NSWindowController means its an Mac OSX application and the CoreData Framework for Mac OSX does not have NSFetchedResultsController.h so NSFetchedResultsControllerDelagete protocol is not declared here. For option you can review NSArrayController So review this tutorial.

How to Use Cocoa Bindings and Core Data in a Mac App

Hope this will help you

Upvotes: 1

Related Questions