iOS Question Sign in with Apple and Firebase class. AppleAuthbutton style

Enrico Fuoti

Active Member
Licensed User
Longtime User
Hi all,
I successfully implemented the Apple Sign in class,
The Apple native button is in english. and is not possible to change its color..
I was wondering if it would be possible to start the authorization process programmatically, in order to use a b4x customizable button.
can someone help?
 

Semen Matusovskiy

Well-Known Member
Licensed User
About a language.
You need to set bundle localization, for example:
B4X:
 #PlistExtra : <key>CFBundleLocalizations</key><array><string>Italian</string></array>
A language of following Msgbox depends of IPhone language (Settings - General - Language & Region)

You can change text and background color (dark to light and reverse). For example, in Erel's sample add after btn = NativeButton.Initialize("ASAuthorizationAppleIDButton").RunMethod("new", Null)
B4X:
Dim nx As NativeObject = btn
nx.SetField ("style", 1)
 
Upvote 0

Enrico Fuoti

Active Member
Licensed User
Longtime User
Great ,
thank you Semen..
There is is still a little difference with others swift buttons , but now is acceptable,,
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
You can place AppleAuthButton outside layout (let's say AppleAuthButton1.Left = -1000) and to add own button (for example,. SwiftButton). When user clicks this button, you can emulate button click for real AppleAuthButton:
B4X:
Dim nx As NativeObject = AppleAuthButton1.btn
nx.RunMethod ("sendActionsForControlEvents:", Array (64)) ' UIControlEventTouchUpInside
 
Upvote 0

Johan Hormaza

Well-Known Member
Licensed User
Longtime User
You can place AppleAuthButton outside layout (let's say AppleAuthButton1.Left = -1000) and to add own button (for example,. SwiftButton). When user clicks this button, you can emulate button click for real AppleAuthButton:
B4X:
Dim nx As NativeObject = AppleAuthButton1.btn
nx.RunMethod ("sendActionsForControlEvents:", Array (64)) ' UIControlEventTouchUpInside
And if I just want to get the Click event of AppleAuthButton1. What would the event be?

Thanks
 
Upvote 0
Top