Skip to content

Instantly share code, notes, and snippets.

@matzew
Last active Dec 10, 2015
Embed
What would you like to do?
- (void)viewDidLoad {
[super viewDidLoad];
...
NSFetchRequest *myFetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *myEntity = [NSEntityDescription entityForName:@"Tag"
inManagedObjectContext:aerogearPlugin.managedObjectContext];
[myFetchRequest setEntity:myEntity];
NSError *error = nil;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(remoteObjectFetched:)
name:AFIncrementalStoreContextDidFetchRemoteValues
object:aerogearPlugin.managedObjectContext];
[aerogearPlugin.managedObjectContext executeFetchRequest:myFetchRequest error:&error];
}
- (void) remoteObjectFetched:(NSNotification*)notification {
NSDictionary *userInfo = [notification userInfo];
NSArray *fetchedObjects = [userInfo objectForKey:AFIncrementalStoreFetchedObjectsKey];
}
@matzew

This comment has been minimized.

Copy link
Owner Author

@matzew matzew commented Dec 31, 2012

The CoreData NSManagedObjectContext will be received from the AeroGear plugin class... (aerogearPlugin.managedObjectContext).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment