SkedGo's TripKit for iOS
Additional documentation is available on the TripGo Developer page
Components
- TripKit (iOS, iOS extension, macOS): Core functionality for A-to-B routing, waypoint routing, real-time updates, transport data, and more.
- TripKitUI (iOS): UI elements for displaying trips on a map and TripGo-styled table cells.
- TripKitBookings (iOS): User accounts and in-app booking functionality.
- TripKitAddOns/InterApp (iOS): Helpers for deep linking into other apps, such as FlitWays, GoCatch, Ingogo, Lyft, Ola and Uber.
- TripKitAddOns/Share (iOS, iOS extensions, macOS): Helpers for creating shareable links to trips, services, transit stops, and meeting locations, that open in TripGo's web app.
Installation
Cocoapods (recommended)
Add desired pods:
pod 'TripKit', '~> 3.0'
pod 'TripKitUI', '~> 3.0'
pod 'TripKitBookings', '~> 3.0'
pod 'TripKitAddOns/InterApp', '~> 3.0'
pod 'TripKitAddOns/Share', '~> 3.0'
This is the recommended way as it let's you cherry-pick the desired components and if you use any of TripKit's dependencies, such as RxSwift, you'll end up with only a single copy of that.
Carthage
TripKit with all its components is also available through Carthage. Note that this means that it's currently supprting iOS only.
Add this to your Cartfile
:
github "skedgo/tripkit-ios" "v3.0"
Then run carthage update
and add the framework to your project as described in the Carthage docs.
Manually
- Drag the files into your project.
- Add dependencies (see TripKit.podspec)
- Add
-DTK_NO_MODULE
to your target'sOther C Flags
andOther Swift Flags
- Add
TK_NO_MODULE=1
to your target'sPreprocessor Macros
If there's any trouble with that, see the example under Project.
Set-up
- In your app delegate, provide your API key and start a new session:
func applicationDidFinishLaunching(_ aNotification: Notification) {
TripKit.apiKey = "MY_API_KEY"
TripKit.prepareForNewSession()
// ...
}
- By default, calls to SkedGo's servers include an identifier that tracks calls from a single installation across session. This behaviour is opt-out. You can overwrite this by setting
TripKit.allowTracking
.