OneBusAway / otpkit

OpenTripPlanner library for iOS, written in Swift

Home Page:https://github.com/orgs/OneBusAway/projects/3/views/1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OTPKit

OpenTripPlanner library for iOS, written in Swift.

Compatibility

  • 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.

Architecture

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.

History

This project was created by Hilmy Veradin with Aaron Brethorst as part of the Google Summer of Code 2024 program.

Code Quality

Unit Testing and CI

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.

SwiftLint

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.

License

OTPKit is licensed under the Apache 2.0 license. See LICENSE for more details.

Additional Information

As mentioned in the History section, this repo was originally created as a Google Summer of Code Project. Here is the final report:

Google Summer of Code 2024 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.

Project Goals

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.

What Was Done

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.

Current State

OTPKit is now available on TestFlight via OTPKitDemo. We are waiting for our beta testers to try it out and gather feedback.

What's Left To Do

After receiving TestFlight feedback, the remaining tasks include integrating OTPKit into the OneBusAway App while making some improvements.

Code Merged Upstream

Some of the code that has been merged:

Codebase improvement
Main Tasks
Bug Fixes

Challenges and Learnings

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.

About

OpenTripPlanner library for iOS, written in Swift

https://github.com/orgs/OneBusAway/projects/3/views/1

License:Apache License 2.0


Languages

Language:Swift 99.1%Language:Shell 0.6%Language:Objective-C 0.4%