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
button
The button used to start the login action.
loginResult
The successful login result.
-
Called if the login action fails.
Declaration
Swift
func loginButton(_ button: LoginButton, didFailLogin error: LineSDKError)
Parameters
button
The button used to start the login action.
error
The strong typed
LineSDKError
of the failed login. -
Warning
Deprecated. Use the same delegate method which receivesLineSDKError
instead. 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
button
The button used to start the login action.
error
The error of the failed login.