TripKit SDK for iOS

This is the documentation of TripKit iOS, the iOS SDK for the TripGo API.

The SDK consists of the following three frameworks:

TripKit contains the core logic, and the other two depend on it..

Installation

Add it to your dependencies:

.package(name: "TripKit", url: "https://github.com/skedgo/tripkit-ios", from: "4.0.0")

And then add the TripKit, TripKitUI, and/or TripKitInterApp dependencies to your target, as appropriate.

Cocoapods

Add desired pods to your Podfile:

use_frameworks!

pod 'TripKit'
pod 'TripKitUI'
pod 'TripKitInterApp'

Then run pod update and you're set.

Manually

If there's any trouble with that, see the examples in the repository.

Set-up

First up, sign up for a TripGo API key.

In your app delegate, provide your API key and start a new session:

import TripKit

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

  TripKit.apiKey = "MY_API_KEY"
  TripKit.prepareForNewSession()

  // ...
}

You can then start using TripKit and TripKitUI, e.g.:

import TripKitUI

let controller = TKUIHomeViewController()
present(controller, animated: true)

Have a look at the TripKitUIExample in the GitHub repository, as well as the SDK Reference at the top of this page.