iOS Question Apple Login

stevenindon

Active Member
Licensed User
Hello all, I have implemented Apple Login base on this example :https://www.b4x.com/android/forum/threads/user-authentication-with-apple-id.113671/#content

I notice that the Apple Login CustomView button are somehow predesigned...(Black with apple logo). I would like to have my own Button design for the login to
match the whole UIUX.

I have read somewhere that in order to work around this is :

1) Place the apple login button.left = -1000 (Hidden)
2) Create a new button on screen (I will add my own design on this button)
3) New button on click --> call Apple login button on click

I am having trouble calling the Apple login button. Below is the Apple Login button code :

B4X:
Private Sub AppleLoginButton()
    Dim NativeButton As NativeObject
    TW_LoginButton = NativeButton.Initialize("ASAuthorizationAppleIDButton").RunMethod("new", Null)
    Dim no As NativeObject = Me
    no.RunMethod("SetButton:", Array(TW_LoginButton))
    mBase.AddView(TW_LoginButton, 0, 0, mBase.Width, mBase.Height)
    dele_gate = no.Initialize("AuthorizationDelegate").RunMethod("new", Null)
End Sub

With my new button_click(), how can i call Apple Login Button_click()? Please help..
 

stevenindon

Active Member
Licensed User
Hello Semen. Thank you for the guide. Sorry for this late reply as i was out of town for a week for my contract job.
I have re-tried your code for the second attempt and at last got it working.

Thank you for such precious guide.. ? ??
 
Last edited:
Upvote 0
Top