Pregunta

I am using the code below for create my Team NSManagedObjects. But when I print my array object the Xcode console says me the array is empty.

[MagicalRecord saveWithBlock:^(NSManagedObjectContext *localContext)
{
    NSArray *array = [Team MR_importFromArray:objects inContext:localContext];   
}
completion:^(BOOL success, NSError *error)
{

}];

The completion block invokes but I don't understand why? The objects were not created. Any suggestions or workarounds?

The Magical records seems create the records, but with some delay.

¿Fue útil?

Solución

MagicalRecord 2.2 has a bug that isn't saving imports. Use version 2.0.8. It has saveWithBlock

Otros consejos

Add logging of the error in your completion handler to get more information about the issue:

NSLog(@"Error: %@", [error localizedDescription]);

Also, have a look into this thread on GitHub:

https://github.com/magicalpanda/MagicalRecord/issues/656

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top