RLMException - "Binary Too Big"
I am trying to save a Realm object (event) in the area database, but when I try, it crashes, stating that:
Terminating app due to uncaught exception 'RLMException', reason: 'Binary too big'
*** First throw call stack:
(0x185c08f5c 0x19a70ff80 0x1004d0d40 0x1004cf850 0x1004fc718 0x1004d1514 0x1004cfc0c 0x1004fc718 0x100960634 0x100047584 0x100962888 0x1005b9244 0x100960100 0x100043750 0x1000438cc 0x18b1963c8 0x18b196344 0x18b17ec6c 0x18b195c5c 0x18b150bdc 0x18b18f548 0x18b18eaac 0x18b15fa10 0x18b15defc 0x185bc05a4 0x185bc0038 0x185bbdd38 0x185aecdc0 0x190c40088 0x18b1c6f44 0x10003cee8 0x19af3a8b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I am trying to save it as follows:
try! realm.write{
self.realm.add(self.theEvent)
}
My Event object looks something like this:
class Event: Object {
dynamic var title: String = ""
dynamic var image: NSData = NSData()
let items = List<Item>()
}
If the item is just another object that stores one photo.
I am confused by the fact that an attempt to save only 2 photos (1 item in the list plus an image for the event) leads to the fact that the area requires more than 16 MB.
Thanks!
+4
alex1511
source
share1 answer
, (, ), , 16 , , , Realm .
NSData.length
, ?
+6
jpsim