For my iOS application that uses Parse, I need to store an array of custom objects into a PFObject. I tried doing this, and I am getting the error: 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (JSQMessage)'
Is there any possible way to store an array of custom objects in Parse? I can't seem to find a good answer for this.
For your reference, I am using the JSQMessages view controller library at https://github.com/jessesquires/JSQMessagesViewController
The array that I am trying to add to the PFObject is initialized with the code:
[[NSMutableArray alloc] initWithObjects:
[[JSQMessage alloc] initWithText:initialtext sender:[[PFUser currentUser] objectId] date:[NSDate date]],
nil];
JSQMessages. You can then add these PFObjects to an array column in your existing PFObject. The Parse API automatically resolves the object references - See the relational data section - parse.com/docs/ios_guide#objects-pointers/iOS