unused variable check -> turn back on

I think i played around in xcode setting to remove the warning of unused variable

but I can turn it back on.

I can't edit the last column


I would like to be able to do both turn on and turn off.


https://www.flickr.com/gp/157268676@N03/9g4181


Thank you :-)

Accepted Reply

Effectively, the alert is only for var or const defined in func.

No alert for a class property.


Thanks for the feedback, and don't forget to close the thread.

Replies

I do not see how your flickr page is related to tour problem !


Go to your project Settings.

Select Build settings

Search for unused Say YES for unused variables (you can set other unused as well).

In the Build setting, I searched for unused. I saw the setting (3 columns in project, 4 in Targets)

Resolve, myApp (in target only), myApp and iOS Default


I wanted the alerts , so I set all to Yes except for the last column which is set to No and that I cannot change.

That was my ScreenShot.


the reading your answer, I realized that I was checking if it was working with Instance Var and it was not working but I just check inside a func and it work.


I guess it must be the normal behaviour for instance var to not give the alert.



Thank you Claude31, I think it's not the first time you help me !

Effectively, the alert is only for var or const defined in func.

No alert for a class property.


Thanks for the feedback, and don't forget to close the thread.

i wanted to wait before marking the correct answer because i think after that i can't write anymore.


Thank you again