Dolphin MOVE SDK
2.x
2.x
  • Introduction
  • MOVE Services
  • MOVE SDK
    • Getting Started
      • MOVE Dashboard
        • Access Control
        • Configuration
        • Timeline
        • Points of Interest
      • Android
        • Installation
        • Quick Start
      • iOS
        • Installation
        • Quick Start
        • Troubleshooting
      • React Native
      • Flutter
      • Move SDK CLI
    • API Interface
      • Android
        • Initialization
        • Services
      • iOS
        • Initialization
        • Setup
        • Services
      • React Native
        • Components
        • Initialization
        • Services
      • Flutter
        • Initialization
        • Services
    • Models
      • Listeners/Callbacks
      • MoveAssistanceCallStatus
      • MoveAuth
      • MoveAuthError
      • MoveAuthResult
      • MoveAuthState
      • MoveConfig
      • MoveConfigurationError
      • MoveDevice
      • MoveDeviceStatus
      • MoveGeocodeError
      • MoveHealthItem
      • MoveHealthScore
      • MoveOptions
        • DeviceDiscovery
      • MoveSdkState
      • MoveSdkAndroidConfig
      • MoveTripState
      • MoveScanResult
      • MoveServiceFailure
      • MoveServiceWarning
      • MoveShutdownResult
    • Appendix
      • Token refresh
      • Android
        • Permission Handling
          • Permission Overview
          • Runtime Permissions
        • Battery optimization
        • Notification Management
      • iOS
        • Permissions Handling
        • App Store
      • React Native
        • Permission Handling
  • MOVE Backend
    • MOVE Backend
      • MOVE Admin API
      • MOVE TIMELINE API
      • MOVE State API
      • MOVE Last Location API
    • MOVE Generic Notifier
    • MOVE Assistance Notifier
    • Example requests
  • FAQ
  • Changelog
    • Android
    • iOS
    • React
    • Flutter
    • Backend
  • Data privacy (GDPR)
Powered by GitBook
On this page
  • Setup Auth/Config
  • Update Config
  • Update authentication
  • Get SDK Auth State
  • Set SDK Auth State Listener
  • Set SDK Initialization Listener
  • Shutdown
  1. MOVE SDK
  2. API Interface
  3. iOS

Setup

PreviousInitializationNextServices

Last updated 4 months ago

Before services can be started a user object must be setup to use the SDK and a services configuration must be provided (see ).

Setup Auth/Config

Authenticates a user to be used with the SDK.

func setup(authCode: String, config: MoveConfig, options: MoveOptions, callback: @escaping MoveAuthCallback)

Parameters

authCode

String

Auth code.

config

Move services configuration.

options

Move SDK service options dict.

callback

Called after setup with result.

Setup with auth tokens:

func setup(auth: MoveAuth, config: MoveConfig, options: MoveOptions)

Parameters

auth

User account object.

config

Move services configuration.

options

Move SDK service options dict.

Deprecated, use instead

Update Config

Change the config originally passed in setup.

func update(config: MoveConfig, options: MoveOptions? = nil)

Parameters

config

Move services configuration.

options

Move SDK service options dict.

Occasionally this functionality is needed for deployed apps when a projects configuration is updated on the backend.

Precondition: SDK user/config should be setup.

Update authentication

func update(auth: MoveAuth, completion: ((MoveAuthError?) -> Void)? = nil)

Deprecated: Token expiry is no longer a valid auth state forwarded to the app and does not need to be handled.

Get SDK Auth State

func getAuthState() -> MoveAuthState

Return

Latest SDK State

Set SDK Auth State Listener

func setAuthStateUpdateListener(_ listener: AuthStateCallback)

Callback

Authentication Expiry

Set SDK Initialization Listener

Provide a block to be invoked when configuration fetch failed.

func setInitializationListener(_ listener: MoveInitializationCallback)

Callback

Block that gets invoked every time configuration fetch from the server failed.

Shutdown

Shutdown SDK shared instance.

func shutDown(force: Bool, _ callback: ((MoveShutdownResult) -> Void)?)

Parameters

Default

force

true

If true, shutdown executes immediately. Pending Data may be lost.

callback

nil

Precondition: SDK user/config should be setup.

Updates SDK . The host app was expected to fetch a new using its project API key and pass it to the MoveSDK using the following API:

Gets the current .

Provide a block to be invoked every time changes.

Block that gets invoked every time is updated.

The host app is expected to monitor updates viaauthStateUpdateListenerAPI and handle those changes accordingly.

Check for more details about authentication expiry and renewal.

Stops SDK services, send the queued user data, and de-initializes the SDK. After that is executed, the will transit to .uninitialized.

Returns a upon completion. May fail if not forced.

MoveAuth
MoveAuth
MoveAuthState
MoveAuthState
MoveAuthState
MoveSDKState
iOS Quick Start
setup(authCode: ...)
MoveAuthState
MoveAuthState
MoveShutdownResult
Authentication updates and expiry
MoveConfig
MoveConfig
MoveConfig
MoveOptions
MoveOptions
MoveOptions
MoveAuth
MoveAuthCallback
AuthStateCallback