Skip to content

Installation

The current version is 0.4.0. Tags have no v: 0.1.0, 0.2.0, 0.3.0, 0.4.0…

In Xcode: File → Add Package Dependencies… and paste the repository URL. Or in your Package.swift:

Package.swift
dependencies: [
.package(url: "https://github.com/elmaedesistemas/torke-kit-ios", from: "0.4.0")
],
targets: [
.target(name: "MyApp", dependencies: [
.product(name: "TorkeKit", package: "torke-kit-ios"),
.product(name: "TorkeKitSensors", package: "torke-kit-ios"),
])
]
Product What it has Depends on
TorkeKit The engine, RunSession, the torke.run format, RecordedRunProvider, DemoRun Foundation only (iOS 17, macOS 14)
TorkeKitSensors PhoneSensorProvider (CoreMotion + CoreLocation), PhoneBarometer iOS
  1. Explain what you use the sensors for in Info.plist:

    Info.plist
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>We use the GPS to measure the speed and distance of your runs.</string>
    <key>NSMotionUsageDescription</key>
    <string>We use the accelerometer to detect the launch and time the 60 feet.</string>
  2. Ask for permission before arming the run:

    let phone = PhoneSensorProvider()
    await phone.requestPermission()
  3. Keep the screen on while recording:

    UIApplication.shared.isIdleTimerDisabled = true