Skip to content

No localization support, and cannot edit the buttonTextColor #1210

@jmquint00

Description

@jmquint00

It looks like Localization is not supported?

simulator_screenshot_020D1CF2-86D2-4F49-8F54-E2ED190759F0

So I thought I would just do custom auth provider. See below...

class LocalizedAppleAuthProvider: FUIOAuth {
    init() {
        let buttonLabelText = NSLocalizedString("AuthSignInWithApple", comment: "")
        let shortName = NSLocalizedString("AuthProviderApple", comment: "")
        let buttonColor = UIColor.appleInverse
        let iconImage = UIImage(systemName: "applelogo")?.withTintColor(.apple, renderingMode: .alwaysOriginal) ??UIImage().withTintColor(.apple, renderingMode: .alwaysOriginal)
        //let (iconImage, buttonColor, buttonTextColor) = LocalizedAppleAuthProvider.appearanceForCurrentStyle()
        let textColor = UIColor.black
        super.init(
            authUI: FUIAuth.defaultAuthUI()!,
            providerID: "apple.com",
            buttonLabelText: buttonLabelText,
            shortName: shortName,
            buttonColor: buttonColor,
            iconImage: iconImage,
            scopes: [],
            customParameters: [:],
            loginHintKey: nil
        )
    self.buttonAlignment = .center
    }
}

...but cannot seem to be able to modify the color of the text on the button. So, on dark mode, I end up with

simulator_screenshot_4C1AD038-0A61-40BA-B5EB-EE2ED995E756

Thanks for the help,

J.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions