Start a new topic

BUG: Deleting a referenced object will crash iOS

If you have a collection "MessageBoards" with an NSMutableArray "messages" which points to the "Messages" collection, then deleting an item in the "Messages" collection will crash any app attempting to load the KinveyRef previously pointing to it.


messages: --> Messages


If delete a message from the Messages collection, but the KinveyRef doesn't get deleted out of the MessageBoards.message object, then when deserializing the item, the app will crash with:

uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil

Hi Samuel,

The library is doing the contractually correct thing; it's retaining the semantics of the null returned from KCS. It's just that nil's aren't valid to put in containers.

We're considering how to approach this problem and whether it requires a lib change. I'll let you know what we come up with.
Just an update here, we're planning on addressing this with KinveyKit 2.0
Login or Signup to post a comment