SkedGo's TripKit for iOS
Additional documentation is available on the TripGo Developer page
Components
- TripKit (iOS, iOS extensions, macOS): Core functionality for A-to-B routing, waypoint routing, real-time updates, transport data, and more.
- TripKitUI (iOS, iOS extensions): UI elements for displaying trips on a map and TripGo-styled table cells.
- TripKitBookings (iOS): User accounts and in-app booking functionality.
- TripKitInterApp (iOS): Helpers for deep linking into other apps, such as FlitWays, GoCatch, Ingogo, Lyft, Ola and Uber.
Installation
Cocoapods
Add desired pods:
pod 'TripKit', '~> 3.1'
pod 'TripKitUI', '~> 3.1'
pod 'TripKitBookings', '~> 3.1'
pod 'TripKitInterApp', '~> 3.1'
Carthage
Add this to your Cartfile
:
github "skedgo/tripkit-ios" ~> 3.1
Then run carthage update
and add the desired framework to your project as described in the Carthage docs.
When doing so, you'll need to add the respective dependencies:
- TripKit / TripKitInterApp:
- ASPolygonKit
- RxSwift
- RxCocoa
- TripKitUI:
- Those of TripKit, plus:
- ASPolylineView
- Kingfisher
- TripKitBookings:
- Those of TripKitUI, plus:
- KeychainAccess
- OAuthSwift
- KVNProgress
- SwiftyJSON
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()
// ...
}