docs: align README and CLAUDE with current TripPlanner API#147
docs: align README and CLAUDE with current TripPlanner API#147drashya7405 wants to merge 1 commit intoOneBusAway:mainfrom
Conversation
drashya7405
commented
Feb 26, 2026
- iOS badge updated to 18+
- CI badge fixed to [test.yaml]
- OTPView docs updated to TripPlanner
- outdated RestAPIService example fixed
aaronbrethorst
left a comment
There was a problem hiding this comment.
Hey Drashya, nice work tidying up the documentation to reflect the current API surface. Getting the README and CLAUDE.md in sync with the actual code is the kind of unglamorous-but-essential work that helps every contributor who comes after you.
Critical
No critical issues.
Important
- Swift badge still says 5.9, should be 6.0. The README badge reads
Swift-5.9, butPackage.swiftdeclaresswift-tools-version: 6.0and CLAUDE.md documents "Swift version: 6.0". Since you're already fixing badge accuracy in this PR (iOS version, CI workflow), this one should be updated too.README.markdown:3— changeSwift-5.9toSwift-6.0
Fit and Finish
-
SwiftUI example is significantly more complex than necessary. The old README showed a simple SwiftUI
ContentView— clean and scannable for someone evaluating the library. The new example introducesUIViewControllerRepresentable, a fullUIViewControllersubclass,UIHostingController,AnyViewtype-erasure, and manual child view controller management. That's a lot of UIKit ceremony for a "SwiftUI Usage" section. Consider whether a simpler SwiftUI-native example is possible (even if it requires a small wrapper), or at minimum rename the section to "UIKit Integration (SwiftUI Host)" to set accurate expectations. The current "SwiftUI Usage" heading is misleading since the example is fundamentally UIKit. -
AnyViewtype-erasure in examples. Both the SwiftUI and UIKit examples wrap the result ofcreateTripPlannerViewinAnyView(...). SincecreateTripPlannerViewreturnssome View, this is only needed becauseUIHostingControllerrequires a concrete type. Worth a brief inline comment explaining why, so readers don't cargo-cultAnyViewinto pure SwiftUI code where it hurts performance. -
Missing
mapViewin the SwiftUI example's view hierarchy. TheOTPDemoViewControllercreates anMKMapViewand passes it toMKMapViewAdapter, but never adds the map view to the view hierarchy. The hosting controller's view occupies the full bounds. If OTPKit draws routes/annotations on this map view, readers following this example will get a working planner but no visible map. Either add the map view to the hierarchy or add a comment explaining that OTPKit composites the map internally. -
CLAUDE.md "Basic Setup" example still references
OTPViewin comment. Line 183:// 5. Create and present OTP view— the comment still says "OTP view" rather than "trip planner" to match the updated code usingTripPlanner. Minor, but since you're specifically fixing this class of inconsistency, worth catching.