-
-
Save matzew/f5a4dd82ad628eb35980 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The CoreData
NSManagedObjectContext
will be received from the AeroGear plugin class... (aerogearPlugin.managedObjectContext
).