Current Swift SDK Version: 4.3.21

Requirements

  • iOS Version: 13.0+

iOS Signing & Capabilities

To add HealthKit support to your application’s Capabilities:

  1. Open the iOS/ folder of your project in Xcode.
  2. Select the project name in the left sidebar.
  3. Open the Signing & Capabilities section.
  4. In the main view, select + Capability and double-click HealthKit.

For more details, see Apple’s HealthKit setup guide.

Info.plist

Add Health Kit permissions descriptions to your Info.plist file:

<key>NSHealthShareUsageDescription</key>
<string>We will use your health information to better track workouts.</string>

<key>NSHealthUpdateUsageDescription</key>
<string>We will update your health information to better track workouts.</string>

SDK Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. To integrate SpikeSDK into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'SpikeSDK'

Use pod install and pod update commands to install/update pods afterward.

Swift Package Manager

To integrate SpikeSDK into your Xcode project using Swift Package Manager, add it in your Package.swift or through the Project’s Package Dependencies tab:

dependencies: [
    .package(url: "https://gitlab.com/spike_api/spike-ios-sdk", .upToNextMinor(from: "2.3.0"))
]