Skip to main content

SDK Architecture

This page describes the layered architecture of the TopStepComKit SDK and the responsibilities of each component.

Layered Architecture

┌─────────────────────────────────────┐
│ Your App │
└─────────────────┬───────────────────┘

┌─────────────────▼───────────────────┐
│ TopStepComKit │ ← Unified API entry point
│ Single entry, hides implementation│
└─────────────────┬───────────────────┘

┌─────────────────▼───────────────────┐
│ TopStepInterfaceKit │ ← Interface definition layer
│ Protocol + Model + Enum │
└──────┬──────┬──────┬──────┬─────────┘
│ │ │ │
┌────▼─┐ ┌──▼──┐ ┌─▼──┐ ┌▼────┐
│ Fit │ │ NPK │ │ SJ │ │ CRP │ ← Platform implementations
└──────┘ └──┬──┘ └────┘ └─────┘

┌──────▼──────┐
│ BleMetaKit │ ← Low-level BLE communication
└──────┬──────┘

┌──────▼──────┐
│ ToolKit │ ← Utilities
└─────────────┘

Component Descriptions

ComponentDescription
TopStepComKitThe only public-facing entry point. Import only this in your app.
TopStepInterfaceKitDefines all interface Protocols, data models, and enumerations.
TopStepFitKitImplementation for Realtek (FIT) series devices.
TopStepNewPlatformKitImplementation for BES (New Platform) devices.
TopStepPersimwearKitImplementation for Persimwear devices.
TopStepSJWatchKitImplementation for SJ (Shenju) devices.
TopStepCRPKitImplementation for CRP (Moyang) devices.
TopStepBleMetaKitLow-level BLE command encapsulation and communication protocol.
TopStepToolKitLogging, database, encryption and other utilities.

Design Principles

Single Entry Point — Your app only interacts with TopStepComKit. You never import or reference platform-specific kits directly.

Interface-driven — All feature modules are defined as Objective-C protocols in TopStepInterfaceKit. Instances are accessed through [TopStepComKit sharedInstance].xxx (e.g. .heartRate, .bleConnector), making the implementation replaceable.

Multi-platform — The same API works across all supported device platforms. The SDK selects the correct underlying implementation based on TSSDKType you specify during initialization.