Skip to content

About

IOS departure app example

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

About

This iOS project brings you up to speed in using the live arrivals/departures APIs provided by Open Data Platform Swiss Public Transport portal.

The project is developed with Xcode 8.1, Swift 3.x and supports iOS 8.4+ devices

Setup

App running in the iOS simulator

Include the code in your project

In the near future we will offer iOS framework or 3rd party CocoaPods/Carthage library support. Until then you have to import the library manually:

  • copy OpenTransportSwissDepartures/ODPSwiss/* files in your project
  • make sure the files are added to your app main target
  • instantiate ODPSwissDeparturesNetworkController object in the VC with your API token
  • call the fetchDeparturesForStopId on a background thread and use the result array which is of type ODPCH_TripDeparture.
DispatchQueue.global(qos: .background).async {
  self.networkController?.fetchDeparturesForStopId(stopId: stopId, handler:{ (newDepartures) in
    DispatchQueue.main.async(){
      // DO something with newDepartures 
    }
  })
}

Contact

For questions related to OpenData APIs please contact ODPCH team

Do you want to contribute to this project? Please send us your feedback or even better, a pull request!

Contributors:

License

This project is licensed under the terms of the MIT license. See the LICENSE file.

This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs. You are fully responsible for how you use this project.

About

IOS departure app example

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages