A simple iOS app to help you remember when bikes are mounted on your car's roof rack. Never drive into the garage with bikes on top again!
- Bold Visual States - Full-screen gradient UI makes status impossible to miss
- Green = Safe (no bikes mounted)
- Red/Orange = Warning (bikes are mounted)
- CarPlay Dashboard - Widgets appear on your CarPlay dashboard, giving you a last-chance reminder before pulling into the garage
- iCloud Sync - State syncs between iPhone and Apple Watch via iCloud
- Instant Sync - Watch Connectivity provides instant sync when both apps are open
- Interactive Home Screen Widgets - Toggle status directly from your home screen
- watchOS App - Quick access from your Apple Watch
- Watch Complications - See and toggle status from any watch face
- Siri Voice Commands - "Check bikes in BikeBonk" on iPhone or Apple Watch
- Shortcuts Integration - Build automations with HomeKit and other apps
- Localization - English and Norwegian support
| Safe | Warning |
|---|---|
| Safe | Warning |
|---|---|
| Safe | Warning |
|---|---|
| Safe | Warning |
|---|---|
BikeBonk/
├── BikeBonk/ # iOS app
│ ├── BikeBonkApp.swift # App entry point
│ └── ContentView.swift # Main UI
├── BikeBonkWidget/ # iOS home screen widget
│ ├── BikeBonkWidget.swift # Widget configuration & views
│ └── BikeBonkWidgetBundle.swift
├── BikeBonkWatch/ # watchOS app
│ ├── BikeBonkWatchApp.swift # Watch app entry point
│ └── ContentView.swift # Watch UI
├── BikeBonkWatchWidget/ # watchOS complications
│ └── BikeBonkComplication.swift
└── Shared/ # Shared code across all targets
├── BikeState.swift # State management via App Groups + iCloud
├── SyncManager.swift # Hybrid sync (Watch Connectivity + iCloud)
├── Theme.swift # Colors, gradients, icons
├── StatusIconView.swift # Reusable icon component
├── ToggleBikesIntent.swift # AppIntent for interactive widgets
├── SetBikesMountedIntent.swift # AppIntent for setting state
├── GetBikesMountedIntent.swift # AppIntent for checking state
├── AppShortcuts.swift # Siri phrase definitions
├── Color+Hex.swift # Hex color extension
└── [en|nb].lproj/ # Localization files
├── Localizable.strings # UI strings
└── AppShortcuts.strings # Siri phrases
All targets share state via UserDefaults with an App Group container for local caching:
struct BikeState {
static let appGroupID = "group.no.follesoe.BikeBonk.shared"
static var bikesMounted: Bool {
get { shared.bool(forKey: bikesMountedKey) }
set {
shared.set(newValue, forKey: bikesMountedKey) // Local cache
iCloud.set(newValue, forKey: bikesMountedKey) // iCloud sync
WidgetCenter.shared.reloadAllTimelines()
}
}
}The app uses a hybrid sync strategy for iOS ↔ watchOS synchronization:
| Method | Speed | Use Case |
|---|---|---|
| Watch Connectivity | Instant (~0.1s) | Both apps in foreground |
| iCloud Key-Value Store | ~seconds | Background sync, widget changes |
final class SyncManager: NSObject, ObservableObject {
@Published private(set) var bikesMounted: Bool
func setBikesMounted(_ newValue: Bool) {
bikesMounted = newValue
BikeState.bikesMounted = newValue // Writes to local + iCloud
sendViaWatchConnectivity(newValue) // Instant sync when reachable
}
}Sync Flow:
- User toggles state on iPhone
BikeStatewrites to App Group (local) and iCloud KV StoreSyncManagersends via Watch Connectivity if watch is reachable- Watch receives instant update via Watch Connectivity
- If watch app is closed, iCloud delivers update when it opens
Widget/Complication Sync:
- Widgets check iCloud every 10 minutes for cross-device updates
- Same-device updates are instant via
WidgetCenter.shared.reloadAllTimelines()
Widgets use AppIntents to toggle state directly without opening the app:
struct ToggleBikesIntent: AppIntent {
static var title: LocalizedStringResource = "Toggle Bikes"
@MainActor
func perform() async throws -> some IntentResult {
BikeState.toggle()
return .result()
}
}The app provides App Intents for Siri voice commands and Shortcuts automations:
Voice Commands (English):
| Command | Phrases |
|---|---|
| Check status | "What's the status in BikeBonk", "Check bikes in BikeBonk", "Bike status in BikeBonk" |
| Mark mounted | "Bikes mounted in BikeBonk", "Bikes on in BikeBonk", "Loaded bikes in BikeBonk" |
| Mark removed | "Bikes removed in BikeBonk", "Bikes off in BikeBonk", "No bikes in BikeBonk" |
| Toggle | "Change status in BikeBonk", "Toggle in BikeBonk", "Switch bikes in BikeBonk" |
Voice Commands (Norwegian):
| Command | Phrases |
|---|---|
| Check status | "Hva er statusen i BikeBonk", "Sjekk sykler i BikeBonk", "Status i BikeBonk" |
| Mark mounted | "Sykler montert i BikeBonk", "Sykler på i BikeBonk", "Lastet sykler i BikeBonk" |
| Mark removed | "Sykler fjernet i BikeBonk", "Sykler av i BikeBonk", "Ingen sykler i BikeBonk" |
| Toggle | "Endre i BikeBonk", "Bytt i BikeBonk", "Endre status i BikeBonk" |
Shortcuts Automation Example:
Use GetBikesMountedIntent in Shortcuts to build automations:
- "When I open my garage with HomeKit, check if bikes are mounted, and send a notification if true"
struct GetBikesMountedIntent: AppIntent {
static var title: LocalizedStringResource = "intent_check_title"
@MainActor
func perform() async throws -> some IntentResult & ReturnsValue<Bool> & ProvidesDialog {
let mounted = BikeState.bikesMounted
return .result(value: mounted, dialog: ...)
}
}The ReturnsValue<Bool> protocol exposes the state to Shortcuts for use in conditional automations.
A centralized Theme enum provides consistent styling across all targets:
enum Theme {
enum Warning {
static let gradient = LinearGradient(...)
static let icon = "bicycle"
static let badgeIcon = "exclamationmark.triangle.fill"
}
enum Safe {
static let gradient
8622
= LinearGradient(...)
static let icon = "car.fill"
static let badgeIcon = "checkmark.circle.fill"
}
}- iOS 18.0+
- watchOS 11.0+
- Xcode 16.0+
- Swift 5.9+
- Clone the repository
- Open
BikeBonk.xcodeprojin Xcode - Select your development team in Signing & Capabilities
- Update the App Group identifier if needed (
group.no.follesoe.BikeBonk.shared) - Enable iCloud capability with Key-Value Store for all targets
- Build and run
All targets must share the same App Group for local data synchronization:
BikeBonk(iOS app)BikeBonkWidgetExtension(iOS widget)BikeBonkWatch(watchOS app)BikeBonkWatchWidgetExtension(watchOS complications)
All targets must have iCloud Key-Value Store enabled with the same identifier for cross-device sync:
- Select target → Signing & Capabilities → + Capability → iCloud
- Check "Key-value storage"
- Ensure all targets use the same KV Store identifier (e.g.,
$(TeamIdentifierPrefix)no.follesoe.BikeBonkApp)
- Small - Icon with status text
- Medium - Larger icon with full status message
- Circular - Icon only
- Rectangular - Icon with app name and status
- Inline - Icon with short status text
- Corner - Icon with label
The app supports:
- English (en)
- Norwegian Bokmål (nb)
Localization files are in Shared/[lang].lproj/Localizable.strings and shared across all targets.
BikeBonk respects your privacy:
- No data collection - The app does not collect or transmit any personal data to third parties
- No analytics - No tracking or analytics of any kind
- iCloud sync only - State syncs between your devices via your personal iCloud account
- No account required - Uses your existing Apple ID for iCloud sync
Your bike mount status is only stored locally on your devices and in your personal iCloud account.
MIT License - feel free to use this as a starting point for your own projects.
Contributions welcome! Please open an issue or submit a pull request.
- Issues & Bugs: GitHub Issues
- Source Code: GitHub Repository