[sharedInstance getPref]
non-stationary methods are instance methods. the receiver must be an instance. in your case, the instance you want to use is, of course, the sharedInstance that you just created.
inside a class, the method itself is the class itself. why you get an error in this line, because self is not an instance in this context.
source share