OpenTripPlanner library for iOS, written in Swift.
- iOS: OTPKit is compatible with iOS 17.0 and higher.
- OTP: OTPKit is known to be compatible with OpenTripPlanner 1.5.x and higher. It is presumed to work on earlier versions, but is not tested on them.
More to come on this in the future, but for now it's worth mentioning that OTPKit uses OTP 1.x's REST API to communicate with OpenTripPlanner servers because the servers we care most about this framework working with are all running on OTP 1.5.x.
This project was created by Hilmy Veradin with Aaron Brethorst as part of the Google Summer of Code 2024 program.
We make extensive use of unit testing in this project to ensure that our code works as expected and our changes do not cause regressions. All PR merges are gated on unit tests passing in GitHub Actions. Please be sure to run tests locally before opening a pull request. Also, please add or update unit tests to account for changes to your code.
We make extensive use of SwiftLint in order to ensure that our code adheres to standard styles and conventions. Please install Swiftlint locally via Homebrew:
brew install swiftlint
A clean bill of health from SwiftLint is required for merging pull requests.
OTPKit is licensed under the Apache 2.0 license. See LICENSE for more details.
As mentioned in the History section, this repo was originally created as a Google Summer of Code Project. Here is the final report:
This report covers the work completed from the start of the GSOC 2024 period in May through the end of the program in August 2024.
OTPKit is an OpenTripPlanner Client Library written in Swift. This project aims to encapsulate the functionalities of OpenTripPlanner. In its initial version, we aimed to integrate OTPKit into the OneBusAway app, facilitating seamless integration with existing maps and features within the OneBusAway app.
By the end of the GSOC period, several key objectives were accomplished. Most importantly, we successfully integrated OpenTripPlanner using Swift, made the MVP for OpenTripPlanner integration, and managed to make OTPKit usable as a Swift Package.
OTPKit is now available on TestFlight via OTPKitDemo. We are waiting for our beta testers to try it out and gather feedback.
After receiving TestFlight feedback, the remaining tasks include integrating OTPKit into the OneBusAway App while making some improvements.
Some of the code that has been merged:
There were several challenges and learning opportunities while developing OTPKit. Apart from developing this project using SwiftUI from scratch, the most interesting part was the main business logic: integrating SwiftUI MapKit with the OpenTripPlanner server. Additionally, creating OTPKit as a Swift Package to ensure easy library distribution was quite challenging.