Skip to content
Projets

À propos

Intuitive cycling tracker app for iOS built with SwiftUI using Core Location, Core Data, MapKit, CloudKit and Combine. Features live route tracking, live metrics, storage of past cycling routes and statistics.

Développement web et applicatif

Comment ces chiffres sont mesurés

What you can do

  • Start, stop, pause and resume rides with the on-screen controls, with optional auto-pause when you stop moving
  • View live cycling metrics, including distance, speed and elevation gain
  • Large map showing your current location and the path taken
  • Timer showing the cycling time of the ongoing ride

Progression mesurée des étoiles

in 24h
0
in 7 days
+2
in 15 days
+4
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

Go Cycling

A cycling tracker for iPhone and iPad, built with SwiftUI. No sign-in and no ads: your rides are stored on your device and, if you choose, in your own iCloud account.

Download on the App Store

A ride in progress Details of a completed ride Cycling statistics and records Year to date distance chart

About

Go Cycling is a cycling tracker app built exclusively for iOS with SwiftUI. It is intended to be extremely easy to use for cyclists of all levels.

A key part of Go Cycling is its privacy stance: there is no requirement for a sign-in of any kind, and all data is stored on the user's device (and in their own iCloud account if sync is turned on). It also does not contain any advertisements.

What's in the Code

Go Cycling is built with SwiftUI and uses Core Location, MapKit, Core Data with CloudKit, HealthKit and Swift Charts. Here's where to find each part:

Area Where to look
Live ride tracking: Core Location with background updates, published to SwiftUI with Combine, and auto-pause when you stop LocationViewModel.swift
Route maps: MKMapView wrapped for SwiftUI, drawing the route as a polyline MapView.swift
Storage and iCloud sync: Core Data with NSPersistentCloudKitContainer, falling back to a local-only store when iCloud isn't available PersistenceController.swift
Apple Health: saving each ride's cycling distance HealthKitViewModel.swift
Statistics charts (Swift Charts) and the activity heatmap CyclingBarChart.swift, ActivityHeatmapChart.swift
GPX import and export, including .gpx files opened from other apps GPXImporter.swift, GPXExporter.swift
Shareable ride images: MKMapSnapshotter and UIGraphicsImageRenderer RideShareImage.swift
Alternate app icons unlocked by activity awards ChangeAppIconView.swift, ActivityAwardsViewModel.swift
App Store screenshots captured by UI tests, with app state seeded by a debug-only screenshot mode ScreenshotTests.swift, ScreenshotMode.swift

Build and Run

Go Cycling is developed with Xcode 26.

  1. Clone the repository and open Go Cycling.xcodeproj.

  2. Create TelemetryDeck.xcconfig in the repository root. It holds the app's analytics ID, so it isn't committed, and the project won't build without it. An empty ID works for local builds:

    echo "GoCyclingAppID =" > TelemetryDeck.xcconfig
    
  3. Choose an iPhone or iPad simulator and run. To try ride tracking in the simulator, start a ride and choose Features → Location → City Bicycle Ride from the Simulator menu.

To run on a device, choose your own team under Signing & Capabilities and change the bundle identifier. iCloud sync and Apple Health need those capabilities set up for your team.

System Requirements

This app is designed to support all iPhones and iPads with iOS 15/iPadOS 15 and above due to the use of the latest SwiftUI features.

For iPads, this includes support for both landscape and portrait modes along with Slide Over and multitasking screen sizes.

Usage

Note: For Go Cycling to track your current location, you must allow location access in Settings (the app will also ask for permission on the first launch). The location permissions must be set to "Always Allow" for location updates to occur while the app is not on the screen.

To use this app, first, start a new cycling route from the Cycle tab. The timer should start incrementing, you can choose to leave your device locked or unlocked.

While the route is ongoing you will see metrics on the Cycle tab of your current progress as well as your path on the map.

Once you are finished with your cycling route, you can complete the route by using the stop button. The route will be saved to your device and is viewable in the History tab along with metrics about the route.

More routes can be created in this same way and they can all be viewed, sorted and deleted from the History tab.

App Features

Go Cycling has many features packed into four tabs: Cycle, History, Statistics and Settings. It also fully supports both light and dark mode, automatically setting the mode based on device settings.

Note: All screenshots shown were taken on an iPhone 17 Pro Max simulator.

Features of the Cycle Tab

  • Start, stop, pause and resume rides with the on-screen controls, with optional auto-pause when you stop moving
  • View live cycling metrics, including distance, speed and elevation gain
  • Large map showing your current location and the path taken
  • Timer showing the cycling time of the ongoing ride
  • Assign your ride to a new or existing category when you finish

Device Screenshots of the Cycle Tab

Cycle Tab Ride in Progress Ride in Progress (Dark) Categorizing a Ride
Cycle tab Ride in progress Ride in progress in dark mode Categorizing a ride

Features of the History Tab

  • View all past rides in an easily readable list
  • Sort your rides by date, distance, time or average speed, in ascending or descending order
  • Filter your rides by category, rename your categories or recategorize individual rides
  • Open a ride to see its route on a full screen map along with its metrics, including average and top speed
  • Share a ride as an image
  • Import and export rides as GPX files
  • Delete a ride by swiping to the left

Device Screenshots of the History Tab

Cycling History Ride Details Filtering by Category Renaming Categories
Cycling history Ride details Filtering by category Renaming categories

Features of the Statistics Tab

  • Charts of distance, elevation, time and rides over the past week, month, 3 months, 6 months, year to date and past year
  • Compare each period with the previous one
  • Activity heatmap of the days you rode
  • Records for single rides and cumulative cycling
  • Awards for activity milestones, which unlock alternate app icons

Device Screenshots of the Statistics Tab

Cycling Statistics Activity Heatmap Past 7 Days Chart Year to Date Chart
Cycling statistics Activity heatmap Past 7 days chart Year to date chart

Settings Features Throughout the App

  • Customize the app colour and app icon to fit your preferences
  • Set your preferred units, choose the map type and show or hide metrics on the map
  • Turn iCloud sync and Apple Health on or off
  • Keep the screen from locking during rides, and turn auto-pause on or off
  • Choose whether rides can be categorized and deleted
  • Option to reset all settings back to the defaults and delete all stored rides
  • The sort order you choose in the History tab is remembered

Device Screenshots of Settings Features

Settings Sync and Health Settings
Settings Sync and Health settings

Future Development

This app has been an immense amount of fun to develop and I have greatly enjoyed using SwiftUI! I am planning on continuing to add features as time permits and some ideas that are on my roadmap are listed below:

  • Calorie tracking within the app as an optional metric
  • Route generator feature where a user could enter the distance they want to ride and the app could suggest a route for them

Thank you very much for viewing this project!

Explorer des projets similaires

Chargement…