> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spikeapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# iOS SDK Setup

> This document provides a setup guide of the Spike SDK for iOS platform.

## Version

**Current Swift SDK Version:** `4.7.11`

## Resources

* Swift Package: [Available here](https://gitlab.com/spike_api/spike-ios-sdk)
* API Reference for `SpikeSDK`: [Available here](https://spike_api.gitlab.io/spike-ios-sdk/documentation/spikesdk/spikeconnectionapiv3/)
* Example app: [Available here](https://gitlab.com/spike_api/public/spike-sdk-examples/-/tree/master/swift-v3)

## Requirements

* **iOS Version**: `13.0+`
* **Xcode 26+** is required.

## 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](https://developer.apple.com/documentation/healthkit/setting_up_healthkit).

## Info.plist

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

```xml theme={null}
<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:

```swift theme={null}
dependencies: [
    .package(url: "https://gitlab.com/spike_api/spike-ios-sdk", .upToNextMinor(from: "4.7.11"))
]
```
