Setup
Before services can be started a user object must be setup to use the SDK and a services configuration must be provided (see iOS Quick Start).
Setup Auth/Config
Authenticates a user to be used with the SDK.
func setup(authCode: String, config: MoveConfig, options: MoveOptions, callback: @escaping MoveAuthCallback)func setup(authCode: String, config: MoveConfig, options: MoveOptions) async -> MoveAuthResultParameters
authCode
String
Auth code.
Setup with auth tokens:
func setup(auth: MoveAuth, config: MoveConfig, options: MoveOptions)Parameters
Update Config
Change the config originally passed in setup.
Parameters
Occasionally this functionality is needed for deployed apps when a projects configuration is updated on the backend.
Update authentication
Updates SDK MoveAuth. The host app was expected to fetch a new MoveAuth using its project API key and pass it to the MoveSDK using the following API:
Get SDK Auth State
Gets the current MoveAuthState.
Return
Latest SDK State
Set SDK Auth State Listener
Provide a block to be invoked every time MoveAuthState changes.
Callback
Block that gets invoked every time MoveAuthState is updated.
Set SDK Initialization Listener
Provide a block to be invoked when configuration fetch failed.
Callback
Block that gets invoked every time configuration fetch from the server failed.
Shutdown
Shutdown SDK shared instance.
Stops SDK services, send the queued user data, and de-initializes the SDK. After that is executed, the MoveSDKState will transit to .uninitialized.
Parameters
Default
force
true
If true, shutdown executes immediately. Pending Data may be lost.
timeout
0
Ignored if force == true.
If timeout > 0 unsuccessful shutdown will continue trying to send data until timeout expires, the app is terminated, or a call to setup(authCode: ...) are made.
callback
nil
Returns a MoveShutdownResult upon completion. May fail if not forced. If timeout is set, pending shutdown will continue after the callback.
Last updated