I have to create a dynamic NSArray, that is, I don\'t know the size of the array or what elements the array is going to have. The elements need to be added to the array dynamica
Here is another way to add object in array if you are working with immutable array. Which is thread safe.
You can use arrayByAddingObject method. Some times it's much better. Here is discussion about it: NSMutableArray vs NSArray which is better
arrayByAddingObject