7

I'm trying to connect my CoreData to iCloud using NSFetchedResultController basing on iCloud example.

NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:self.managedObjectContext sectionNameKeyPath:@"date" cacheName:@"Root1"];
aFetchedResultsController.delegate = self;

However i get such warning on second line: warning: Semantic Issue: Passing 'RootViewController *const __strong' to parameter of incompatible type 'id'. I think that setting delegate to self should be ok, but it's not. Anybody can help?

2
  • 2
    Make RootViewController conform to the NSFetchedResultsControllerDelegate protocol.
    – albertamg
    Jan 3, 2012 at 12:09
  • 1
    Does your class implement the NSFetchedResultsControllerDelegate protocol? Jan 3, 2012 at 12:09

1 Answer 1

8

Make RootViewController conform to the NSFetchedResultsControllerDelegate protocol.

@interface RootViewController : UIViewController <NSFetchedResultsControllerDelegate>
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.