All of them are not a good solution if you need Ivar. I would even use only properties with auto-generated ivars in the class extension in the implementation file in only one line (@synthesize is automatically generated in Objective-C 3.0).
First way:
Yes, it is ivar, but you should not declare it in the header file if you declare it @private, and then use the @implementation block {...}. In the implementation block, you do not need to declare it @private, because @protected is used by default, but in the implementation block it is not displayed for subclasses
The second way:
This is a variable visible only in the translation block, here the .m file itself. This is not global for the entire application. A value is stored for each instance of your class, so this is not ivar (instance variable).
The third way:
It is also not ivar, it is a variable that uses extern by default because you are not writing static. This means that it is in the global symbol table and can be used in other translation units / files if they # import / # include the .m file.
source share