Skip to main content

Quick Start

Search docs: use the Search box in the top navbar (⌘K / Ctrl+K).

AI skills (Cursor / Claude): download on For Cursor Claude or Introduction (download cards at the top).

Add VeltoKit via SPM or CocoaPods, then:

Simple flow (BLE built in)

import VeltoKit

let motion = MotionSDK()
motion.setMode(.paddle) // or .pointer / .gesture

motion.connect() // scan + auto-connect (physical iPhone)

// Each frame (~60 Hz) in your game loop:
let input = motion.pollInput(deltaTime: dt)
paddle.x = CGFloat(input.posX) * viewWidth
if input.didShoot { serveBall() }

Add to Info.plist: NSBluetoothAlwaysUsageDescription (and NSBluetoothPeripheralUsageDescription on older iOS if needed).

Manual bytes (your own BLE stack)

If you already have CBCentralManager notify callbacks:

let sdk = MotionSDK()
sdk.setMode(.paddle)
sdk.enqueueBLE(bytes)
sdk.updateFrame(deltaTime: dt)
let input = sdk.input

Pick a mode

GamesetModeUse
Pong, Quiz.paddleposX, primaryAction
Dart.pointerposX, posY
Bowling.gestureshotTriggered, throwPower

Game examples · GameInput · Installation