Quick Start
iOS
Overall Code
import MoveSDK
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
MoveSDK.shared.setSDKStateListener { state in
switch state {
case .uninitialized:
/* SDK uninitialized*/
break
case .ready:
/* SDK initialized and ready to start the service*/
MoveSDK.shared.startAutomaticDetection()
case .running:
/* SDK Started Detection*/
break
case let .error(error):
switch error {
/* Hanlde SDK State Errors*/
default: break
}
}
}
let sdkConfig = MoveConfig(timelineDetectionService:
[.walking, .driving, .bicycle, .places, .publicTransport],
drivingServices: [.dfd, .behaviour],
otherServices: [.poi])
MoveSDK.shared.initialize(auth: auth, config: sdkConfig, launchOptions: launchOptions) { initError in
if let error = initError {
switch error {
/* Hanlde SDK Initialize Error*/
default: break
}
}
}
}Breakdown
SDK Authorization
SDK Configuration
SDK State
SDK Initialization
Last updated