An iOS application for showing public transit departures from a selected stop/station in Berlin.
- iOS App: Swift, SwiftData, SwiftUI
- Firebase Firestore for storing live activities while they're active
- Firebase Cloud functions (bez4pieci/When-App-API) for updating the live activities via push notifications
- Public transport API
- alexander-albers/tripkit for iOS
- public-transport/hafas-client for the Node.js cloud function
- Check out the code and
cd
to the project root - Set up Firebase:
- Create a new project
- Add an iOS app (instructions)
- Use
com.bez4pieci.When
as bundle id - Leave optional fields blank
- 👉 Download
GoogleService-Info.plist
and put it in the project root
- Use
- Create a new Firestore database. You don't need to do anything beyond just creating it.
- Set up MapBox
- Create an account
- Make a copy of
MapBox.plist-example
and name itMapBox.plist
- Paste your MapBox token as the string value for the key
MBXAccessToken
- Open the project in XCode
- Build with XCode
-
Make sure to open the project in XCoce at least once. This will create the necessary XCode project configuration on your computer.
-
Install xcode-build-server:
brew install xcode-build-server
-
Let SourceKit-LSP know about XCode configuration:
cd <project root> xcode-build-server config -project *.xcodeproj
This command creates a
buildServer.json
file in your project root that allows SourceKit-LSP to understand your Xcode project configuration, including:- Build settings
- Target configurations
- Dependencies
- Module imports
# Build
xcodebuild -project Departures.xcodeproj -scheme Departures -destination 'platform=iOS Simulator,name=iPhone 16'
# Open in the simulator
xcrun simctl launch booted com.bez4pieci.When
This project is licensed under the MIT License - see the LICENSE file for details.