Find out which object being added to NSMutableArray is nil
- by Raphael Caixeta
I started a project using ARC, and I'm inserting a few objects into an NSMutableArray. The objects have all started out as NSStrings, and when attempting to add these objects into the array, I get the following error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' -[__NSArrayM insertObject:atIndex:]: object cannot be nil
This array is holding several objects. Is there a quick way for me to find which of the objects I'm attempting to put into the array is nil?