Join us at HLTH. Las Vegas  |  Meet with our Team

Your app, Powered by EXI Exercise Intelligence

Our personalised physical activity prescription, your app.

Get up and running with SDKs, API keys and integration tools.

EXI® iOS SDK Setup Guide

Add EXI® to your applications

Learn how to create an EXI® powered iOS application and integrate the EXI® SDK into your products and platforms.

1. Add the EXI® SDK as a dependency

  • Create a new iOS application, choosing your own specifications

Installation using CocoaPods

You will need version 1.12.1+ of Cocoapods on your machine. Instructions for installing can be found in the CocoaPods installation guide here.

Once installed you can install the SDK follows:

  • Create a Podfile, and add your dependencies:
  • Create a new project in Xcode as you would normally.
  • Open a terminal window, and $ cd into your project directory.
  • Create a Podfile. This can be done by running $ pod init .
  • Open your Podfile. The first line should specify the platform and version supported.
  • Add SDK package to your newly created podfile
pod 'EXISDK', :git => 'git@github.com:exiteam/exi-ios-framework.git', :branch => 'develop'
  • Install pod by running the following command in the project directory
$ pod install

On success

Please close any current Xcode sessions and use `YourAppName.xcworkspace` for this project from now on.
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

Please note: Currently the pod is not published to the CocoapPods master repository but is available via an EXI private repo. Contact your line manager if authentication details have not been provided.

Your PodFile should look similar to this:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'TestEXIiOSSDK' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for TestEXIiOSSDK
    pod 'EXISDK', :git => 'git@github.com:exiteam/exi-ios-framework.git', :branch => 'develop'

  target 'TestEXIiOSSDKTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'TestEXIiOSSDKUITests' do
    # Pods for testing
  end

end

Installation using Swift Package Manager

  1. Launch your Xcode project file
  2. Click on Swift Packages and click on the plus to add a package
  3. Enter the following repository url ‘https://github.com/exiteam/exi-ios-sdk – Connect your Github account ‘ and click next
  4. Leave the default settings to get the most recent release and click next to finish importing

2. Project Setup

Initialise the SDK

Main SDK setup method:

public func setup(configuration: EXIConfiguration)

SDK setup example:

import EXISDK
let configuration = EXIConfiguration(apiKey: "YOUR_DEVELOPER_API_KEY", jwsToken: "YOUR_JWT_TOKEN")
EXISDK.setup(configuration: configuration)
init(
    apiKey: String,
    jwsToken: String? = nil,
    logggingEnabled: Bool = true,
    mockEnabled: Bool = false
) 

3. Add Your Credentials To IDE

Paste the newly generated API key into the AppConfig-debug file to variable EXI_API_KEY

4. Start your development journey with EXI®

let configuration = EXIConfiguration(apiKey: "YOUR_DEVELOPER_API_KEY", jwsToken: "YOUR_JWT_TOKEN")
        EXISDK.setup(configuration: configuration)
            EXISDK.getPrescription { result in
                switch result {
                case .success:
                print("All Good")
                case .failure(let error):
                print(error)
                }
            }

You are now ready to build your customer health journeys!

Please consult our iOS developer code docs and our UML Diagram repository to discover what is possible with EXI® SDK.