This project exposes the official swiss OeV Icons as a Swift Package to be used on Apple platform applications.
SBB publishes these icon sets on GitHub under an Apache License. SBB Icons
and Timetable Icons
are published on sbb-design-systems/sbb-icons. The Pictograms
are published on sbb-design-systems/sbb-pictograms.
This project adds those two repositories as submodules and imports the Timetable Icons
and Pictograms
to an importable Swift Package.
⚠️ Due to usage restrictions onSBB Icons
, those assets are excluded from the package.
For more details about icon sets visit
- SBB icons - Only to be used in SBB led projects.
⚠️ These icons are excluded from the import!- Timetable icons
- Pictograms
Add OEVIcons
to your project using Swift Package Manger:
dependencies: [
.package(url: "https://github.com/openTdataCH/oev-icons-swift.git", branch: "main"),
]
import SwiftUI
import OEVIcons
struct SampleView: View {
var body: some View {
// Directly reference assets
Pictograms.train_right_framed
OEVIcons.tgv
// Display asset using image name
Image("electric-bike-charging-station-left", bundle: Pictograms.bundle)
Image("ev-77", bundle: OEVIcons.bundle)
}
}
- check if project can be added to opentransportdata
- transform icon names in generated enum to pascal-case
- maybe add helper functions from OJP Sample App
- decide about a kotlin/android version
In order to import the latest icons you have to update the submodules and run ./copy-svgs-to-assets.swift
. Commit the changes on a new branch and create a pull request.
When the pull request is approved and merged, a new version tag will be set.
The original icons and this project are published under an Apache License. Make sure you comply with the right of use.