Created
August 27, 2012 17:31
-
-
Save patzearfoss/3490639 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
NSSet *waitingTemp = [self.waitingObjects copy]; | |
for (NSManagedObject *object in waitingTemp) | |
{ | |
if (! [object hasDependencies]) | |
{ | |
__weak typeof (self) weakSelf = self; | |
[self.waitingObjects removeObject:object]; | |
[self.dispatchedObjects addObject:object]; | |
[SBManagedObjectHelper saveObject:object | |
syncToServer:YES | |
success:^(NSManagedObject *savedObject) { | |
[weakSelf servicesSuccessHandler:savedObject]; | |
} failure:^(NSError *error) { | |
[weakSelf servicesFailureHandler:error]; | |
}]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment