Skip to content

Quickstart

This quickstart is platform-neutral and focuses on the core integration path.

1. Get integration credentials

Start by obtaining SDK access and backend environment details from the TrainingKit team, then configure package/repository access for your target platform.

2. Implement JWT generation on your backend

Implement JWT generation server-side using your private key, include the required user identity claims, and keep key material strictly on your backend infrastructure. This JWT layer is optional for some public read flows, but it is strongly recommended because it protects your B2B API access and quota.

For the exact JWT contract, including supported algorithms and claim requirements, refer to Server-side Request Authentication.

3. Retrieve workout data via GraphQL

Query workout lists and session payloads through GraphQL, and reuse the established query patterns documented in API Queries. Each B2B integration uses client-specific endpoints provided during onboarding.

4. Launch a workout from your app

On iOS, initialize the public SDK controllers ClassicWorkoutController or StreamingWorkoutController with the session payload and TrainingKitToken. On Android, initialize GoFragment or WorkoutVideoFragment with the same runtime inputs. If you see names such as SampleClassicWorkoutController or SampleStreamingWorkoutController in sample code, those are host-app subclasses used to override SDK callbacks, not different public SDK types.

On React Native, the trainingkit-reactnative package wraps both native SDKs: pass the session payload to a single launchWorkout(session) call and it dispatches to the right native flow automatically. See React Native.

The recommended pattern is to fetch publicWorkoutSession when the user is ready to start the workout, then launch immediately with the returned payload and signature.

5. Handle completion and tracking

Handle completion callbacks to capture session results, then forward relevant events and metrics to your backend or analytics pipeline.

See platform details in iOS, Android, and React Native.