Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danramteke/swiftgtfssupport
GTFS Protocol Buffer bindings for Swift
https://github.com/danramteke/swiftgtfssupport
gtfs protocol-buffers swift
Last synced: 19 days ago
JSON representation
GTFS Protocol Buffer bindings for Swift
- Host: GitHub
- URL: https://github.com/danramteke/swiftgtfssupport
- Owner: danramteke
- License: mit
- Created: 2017-05-02T17:16:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-04T16:11:55.000Z (over 7 years ago)
- Last Synced: 2024-11-09T22:41:13.556Z (3 months ago)
- Topics: gtfs, protocol-buffers, swift
- Language: Swift
- Size: 23.4 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
SwiftGtfsSupport
----------------This is a library you can include in your Swift projects. It contains a Swift version of the GTFS binding.
This project started as a way to modularize a different project I was working on. MIT license.
Usage
-----In your `Package.swift` put something like this:
```
let package = Package(
name: "MyPackage",
dependencies: [
.Package(url: "https://github.com/danramteke/SwiftGtfsSupport", Version(0,0,1)),
]
)
```And in code, once you have the GTFS data as binary,
```
let feed = try TransitRealtime_FeedMessage(serializedData: gtfsData)
```Steps this package is doing for you
-----------------------------------1. Install `protoc` via `brew install protobuf` or from https://github.com/google/protobuf
2. clone https://github.com/apple/swift-protobuf
3. `cd swift-protobuf && swift build`
4. `protoc --swift_opt=Visibility=Public --swift_out=./Sources/ --plugin=../swift-protobuf/.build/debug/protoc-gen-swift gtfs-realtime.proto`Plus, it means this code is in a separate package, keeping your project clean and organized 💅🏽