NMAMobileAuthenticationClientInitializer
public final class NMAMobileAuthenticationClientInitializer : NSObject
A builder for NMAMobileAuthenticationClient
.
-
Creates a new instance of the
NMAMobileAuthenticationClientInitializer
to help initialize theNMAMobileAuthenticationClient
.Declaration
Swift
override public init()
-
Sets the configuration of the
NMAMobileAuthenticationClient
.Important
Providing the configuration is required.Declaration
Swift
@discardableResult @objc public func configuration(_ nmaConfiguration: NMAConfiguration) -> NMAMobileAuthenticationClientInitializer
Parameters
nmaConfiguration
the
NMAMobileAuthenticationClient
configuration.Return Value
the
NMAMobileAuthenticationClientInitializer
builder. -
Specifies the block to execute when the
NMAMobileAuthenticationClient
could be successfully built.Important
Providing theonSuccess
block is required.Declaration
Swift
@discardableResult @objc public func onSuccess(_ onSuccess: @escaping (NMAMobileAuthenticationClient) -> ()) -> NMAMobileAuthenticationClientInitializer
Parameters
onSuccess
the block to execute when the
NMAMobileAuthenticationClient
could be successfully built, receives theNMAMobileAuthenticationClient
.Return Value
the
NMAMobileAuthenticationClientInitializer
builder. -
Specifies the block to execute when the
NMAMobileAuthenticationClient
couldn’t be built.Important
Providing theonError
block is required.Declaration
Swift
@discardableResult @objc public func onError(_ onError: @escaping (NMAInitializationError) -> ()) -> NMAMobileAuthenticationClientInitializer
Parameters
onError
the block to execute when the
NMAMobileAuthenticationClient
couldn’t be built, receives anNMAInitializationError
.Return Value
the
NMAMobileAuthenticationClientInitializer
builder. -
Starts the creation of an instance of the
NMAMobileAuthenticationClient
. If an error occurs, it is provided throughonError(_:)
. If theNMAMobileAuthenticationClient
can be successfully built and initialized, it is provided throughonSuccess(_:)
.Declaration
Swift
@objc public func execute()