Entity Update error: after it has been removed from its context

Good morning,

After updating to IOS11 in order to give support to iPhoneX our app has stopped working with iCloud correctly. The thing is that CoreData is working alright in Local Store, however when we try to use an iCloud document we stop being able to update an Entity. Whenever we try to update an object we get:

Mutating a managed object 0x10757e800 (0x1075360e0) after it has been removed from its context. CoreData: error: Mutating a managed object 0x10757e800 (0x1075360e0) after it has been removed from its context.

We have been tracking the issue and:

  • There is just a ManagedObjectContext (it works alright in local)
  • All the instances are correct
  • We have seen there are a lot more ManagedContext saves in iCloud environment.
  • We can create other entities but not update them.

We have also try the code in IOS10.3.3 and it worked allright. Is UIManagedDocument working properly in iCloud for IOS11? could anyone give us a clue to resolve the issue?

Thanks in advance