How do I customize "Login Error invalid login credentials"?

709 Views Asked by At

I am having trouble with a login issue on Parse.com.

When the user enters wrong information for the username or password, a message shows up:

Login Error invalid login credentials

Thats is functionally fine, but I can’t figure out where this message is coming from, in order to customize it.

I first thought the method

- (void)logInViewController:(PFLogInViewController *)logInController
    didFailToLogInWithError:(NSError *)error

would be what I was looking for. But after trying out, it appears that it is not. Even if I overwrite it, the old message is still coming up, on top of my overwritten method.

Any idea about how I can change this message?

1

There are 1 best solutions below

7
jimrice On

You might be able to customize by doing the following:

From Parse.com - The alert cannot be removed in the current SDK, but you can provide a Localizable.strings file that overrides the following strings:

NSString *ok = NSLocalizedString(@"OK", @"OK");
NSString *title = NSLocalizedString(@"Your Error Title", @"Login Error");
NSString *message = NSLocalizedString(@"Your Error Message", @"invalid login credentials");

Replace Your Error Title or Message with what you would like to display to the user.