Installation
VeltoKit ships as a Swift package and CocoaPod (includes CoreBluetooth for MotionSDK.connect()). The sample Platform layer (TrikiInputAdapter) is optional UI/calibration glue in app/Platform.
Swift Package Manager (recommended)
Xcode: File → Add Package Dependencies… →
https://github.com/koderhack/veltokit
Select product VeltoKit → add to your app target.
Package.swift:
dependencies: [
.package(url: "https://github.com/koderhack/veltokit", from: "0.1.0"),
],
targets: [
.target(
name: "YourApp",
dependencies: [
.product(name: "VeltoKit", package: "veltokit"),
]
),
]
Requires iOS 16+, Swift 5.9+.
CocoaPods
platform :ios, '16.0'
target 'YourApp' do
use_frameworks!
pod 'VeltoKit', '~> 0.1.0'
end
Then pod install and open the .xcworkspace.
Podspec: VeltoKit.podspec in the repo root.
Xcode project (monorepo / fork)
- Open
app/gametriki.xcodeproj(or copy theVeltoKit/folder). - Add target VeltoKit — Frameworks + Target Dependency.
import VeltoKit
First import
import VeltoKit
let motion = MotionSDK()
motion.setMode(.paddle)
motion.connect() // scan + auto-connect (physical iPhone)
// Each frame in your game loop:
let input = motion.pollInput(deltaTime: dt)
Add to Info.plist: NSBluetoothAlwaysUsageDescription.
- Real BLE needs a physical iPhone (Simulator has no controller radio).
- Already have
CBCentralManager? Skipconnect()and useenqueueBLE+updateFrame— see Quick start. - Sample app uses
TrikiInputAdapterfor calibration prompts; it delegates tomotionSDK.connect().