Core Data model attribute with type binary and "Allow External Storage" enabled cause crash in NSPersistentCloudKitContainer sync mechanism.
This happens only on receiving device, meaning upload to CloudKit is successful, but download from CloudKit causes crash when in NSManagedContext.
<NSSQLSaveChangesRequestContext: 0x281ec8420> , *** NSAllocateMemoryPages(28317598) failed with userInfo of (null)
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** NSAllocateMemoryPages(30318498) failed
This is obviously a memory crash, but I can't figure out how to workaround it, it seems to be an iOS bug.