When I was working with passing data related to an external API response I created a singleton class which I could include the header of in each ViewController implementation file and then subsequently get the singleton instance and then retrieve its values.
For example:
Inside ViewController1.h:
#include "SingletonClass.h"
Inside ViewController1.m:
[[SingletonClass getClassInstance] someBool:YES];
Inside the header file of a class you want to retrieve the variable from:
#include "SingletonClass.h"
Inside the implementation file of a class you want to retrieve the variable from:
bool someBool = [[SingletonClass getClassInstance] someBool]
if (someBool) {
} else {
}
I am not in front of my Mac at the moment so this may not be totally syntactically correct, but I hope it may give you an idea of how you could accomplish your question
Note: IMO the accepted answer's use of NSUserDefaults is bad practice as it is a system wide database of user preferences, assigning application specific values to it feels like using it for something it wasn't meant for. (Do we want a Windows-style registry usage on Mac?)