Skip to main content

Add Kettle

Preqrequisites

The following criterias must be fulfilled to implement the SDK:

  • Minimum iOS target: 11.0

Install Kettle

Cocoapods

Add the following pod to your podfile:

Podfile
pod 'KettleKit', '1.0.12'

Background modes

Add the following background modes to your application:

  • bluetooth-central

Initialize Kettle

AppDelegate.swift
import KettleKit
...

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
...

let kettleConfig = KettleConfig.default()
kettleConfig.developmentApiKey = "<DEVELOPMENT-API-KEY>"
kettleConfig.productionApiKey = "<PRODUCTION-API-KEY>"

Kettle.prepare(config, launchOptions: launchOptions)
...
}