You cannot add nil to an array.
If you need to add "holes" to an array, you must use NSNull.
NSNull is an object that represents nil and is used specifically for this task. The NSNull class defines a singleton object used to represent null values in collection objects (which don’t allow nil values).
[array addObject: [NSNull null]];
iOS programming - the big nerd ranch guide (3rd edition)