I have two NSMutableArrays:
NSMutableArray* currentMessages
NSMutableArray* items
I am trying to copy the contents of items into currentMessages as such:
[self.currentMessages addObjectsFromArray:self.items];
When I am debugging self.items contains 30 objects. After this operation self.currentMessages contains 0 objects.
Why is the copy not working?
Dollars to doughnuts
currentMessagesis nil. A message to nil just returns nil or 0, so the message to add objects would be a no-op and then asking nil for its count will return 0. You need to allocate an NSMutableArray for that property.