Sign in with Apple button title always displays "SIGN_IN_WITH_APPLE"

Viewed 831

I have an app which is localised for two languages: English and Lithuanian. I'm implementing Sign in with Apple functionality and everything is working great except for the button title, which I'm trying to localise.

I'm creating the button as recommended in documentation: let asiButton = ASAuthorizationAppleIDButton(type: .signIn, style: .black) I've entered "SIGN_IN_WITH_APPLE" in Localizable.strings for both languages. When the language is set to Lithuanian, the button displays a correct string, but when I change the language to English, the button always displays SIGN_IN_WITH_APPLE (as in the screenshot).

Screenshot

For some reason it seems to ignore the value I've put into Localizable.strings for an English version (although all other strings work as expected), as I can remove it altogether and have the same outcome.

I've tried getting and setting the label to the button directly through code using asiButton.accessibilityLabel, but this returns nil and setting it results in the same outcome, a button with SIGN_IN_WITH_APPLE title.

Any ideas would be appreciated!

2 Answers

Do not use Localizable.strings for this. ASAuthorizationAppleIDButton is already automatically localized.

I've faced same issue. I added "SIGN_IN_WITH_APPLE" = "Sign in with Apple"; pair to my Localizable.strings that chained to English file and all working fine.

It's kinda an answer, but I suppose this message should be in comments. Sorry, but right now I'm not allowed make comment cause of low reputation count.. )

Related