MenuProgramming Languages

Garmin - FIT Swift SDK

Requirements

The FIT Swift SDK requires macOS 12 or iOS 14 and uses Swift Tools Version 5.9

Install

In an Xcode project, select File > Add Package Dependency and enter the source control repository GitHub URL: https://github.com/garmin/fit-swift-sdk.git

Usage

After the FIT Swift SDK package has been added as dependency, it can be used by importing the FITSwiftSDK module into the appropriate source files.

import FITSwiftSDK

Examples

The package includes example codes, in the test folder, that demonstrate how to use the SDK. These test programs are similar to the Cookbook recipes.

To run the example tests, open /path/to/fit/sdk/swift/package.swift in Xcode, then go to the test navigator and press ⌘U

Xcode Test Navigator.