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?

albertamg
  • 28,492
  • 6
  • 64
  • 71
Nat
  • 12,032
  • 9
  • 56
  • 103

1 Answers1

8

Make RootViewController conform to the NSFetchedResultsControllerDelegate protocol.

@interface RootViewController : UIViewController <NSFetchedResultsControllerDelegate>
albertamg
  • 28,492
  • 6
  • 64
  • 71