In line 2, you create a new datesArray .
Then, on line 6 (the first line of the for loop), you set a new value for datesArray .
The compiler simply warns you that line 2 is not working, and that the code is listening (in the sense that it does not do what you expect).
True, programsArray can be an empty array, in which case you want datesArray just initialize to use it after the fragment that you showed us, but it would be better to make it explicit.
For programsDict , this is even simpler: you initialize it with ... alloc] init] , and then set it to the datesArray object, making the first operation useless.
source share