- Home /
Question by
Blue-Cut · Nov 23, 2017 at 02:32 PM ·
testinggame center
Apple GameCenter authentication: how to test the failure?
Hello,
The game I am developing targets iOS and it uses the connection to Game Center. To authenticate the player, I use the Social
class provided by Unity, just like this:
void Authentication() {
Social.localUser.Authenticate(ProcessAuthentication);
}
void ProcessAuthentication(bool success) { // some code }
All is perfectly working, and this is actually my issue. Unity helps me to test the authentication process by connecting to a fake profile.
Now, I would like to write some Play Mode Tests to make sure that if the authentication fails, my custom error message is correctly shown on the scene.
Does Unity provide an easy way to force the failure? Or should I use a kind of delegate system to override ProcessAuthentication
in my test ?
Comment
Your answer
Follow this Question
Related Questions
Game Center Testing iOS 1 Answer
Checklist in preparing a game for public release. 2 Answers