Countless GameCenter tutorials do this:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(localUserAuthenticationChanged) name:GKPlayerAuthenticationDidChangeNotificationName object:nil];
I have other standard GameCenter methods for authenticating users, etc, but I wanted to received notifications of game center login changes while app is in background; according to a lot of books, online tips, the above code line is how you listen.
But I cannot build the app. It claims name:GKPlayerAuthenticationDidChangeNotificationName is an undeclared identifier… this, right after other GameCenter code works fine (and the libraries and frameworks are indeed imported).
Any idea what is wrong with my name:GKPlayerAuthenticationDidChangeNotificationName ?
You should import game kit in the file where you have that code.