LoginButtonDelegate
public protocol LoginButtonDelegate : AnyObject
Defines methods that allow you to handle different login statuses if you use the predefined LINE Login
button by using the LoginButton class.
-
Called after the login action is started. Since LINE Login is an asynchronous operation, you might want to show an indicator or another visual effect to prevent the user from taking other actions.
Declaration
Swift
func loginButtonDidStartLogin(_ button: LoginButton) -
Called if the login action succeeds.
Declaration
Swift
func loginButton(_ button: LoginButton, didSucceedLogin loginResult: LoginResult)Parameters
buttonThe button used to start the login action.
loginResultThe successful login result.
-
Called if the login action fails.
Declaration
Swift
func loginButton(_ button: LoginButton, didFailLogin error: LineSDKError)Parameters
buttonThe button used to start the login action.
errorThe strong typed
LineSDKErrorof the failed login. -
Warning
Deprecated. Use the same delegate method which receivesLineSDKErrorinstead. It provides a strongly typed and consistent error for the login failure.Called if the login action fails.
Declaration
Swift
func loginButton(_ button: LoginButton, didFailLogin error: Error)Parameters
buttonThe button used to start the login action.
errorThe error of the failed login.
View on GitHub
LoginButtonDelegate Protocol Reference