Can someone please tell me how to resolve this warning

Array’ during its initialization is never read

I am trying to understand the meaning and I have no idea on how to approach the problem.
For I am using the Array but it says that it is not being read.

I just changed the Array so that it is at the top of the Scope and I am still having the same warning.

Same warning

You’ve declared a variable of type NSArray, then allocated and initialised an object of type NSArray and assigned it to that variable.

On the very next line you called a method which created a whole new array and assigned it to the same variable.

The first NSArray you created is never used. Nothing asks it for information such as its count or its first element, nothing adds objects to it or removes objects from it. It will immediately be deinitialised and deallocated, having never been used for anything. You could erase this part entirely: = [[NSArray alloc] init] and the functionality of your code would be identical.

The compiler is telling you that there’s no point in it allocating memory for an object your code is never going to use. So either use it for something, or don’t bother creating it.

That solved the warning.
I deeply appreciate for taking the time for explaining my warning.
May you have an INCREDIBLE DAY.
For you have certainly made mine.