Denial of Apple's Local Network privacy permission is the most common cause of
"BikeControl can't see my trainer app" on iOS and macOS, and it fails
completely silently: Bonjour browses return nothing forever, advertisements
never leave the device, nothing throws. An app watching only for errors cannot
tell "permission is off" from "there is nothing out there".
Apple ships no authorization-status API for it (not iOS 14...26, not macOS
15...26), so the new local_network_permission plugin measures it: an NWListener
and an NWBrowser on _bikecontrol-preflight._tcp, then
browser discovers the listener -> granted
kDNSServiceErr_PolicyDenied (-65570) -> denied
neither, before the deadline -> unknown
unknown is a real outcome, not an error — a device with no usable network never
completes the round trip even when the permission is fine — so everything fails
open on it and only a positive denial blocks the user.
The probe *is* the request: the system prompt fires on the first Bonjour
operation, so there is no separate request step, and after the user answers,
System Settings is the only way back.
- LocalNetworkAccess caches the result (probes cost a real round trip while
getStatus() runs on every tile mount, tap and resume) and collapses
concurrent probes into one, since two listeners on the same service type
would resolve each other.
- LocalNetworkRequirement gates the three LAN tiles: MyWhoosh Link, Zwift mDNS
and OpenBikeControl mDNS. Suppressed in screenshot/demo mode like the rest.
- Diagnostics drop the old guess (inferred from whether a discovery scan
returned anything, which could not tell denied from an empty LAN) for the
measured local-network=granted|denied|unknown.
- _bikecontrol-preflight._tcp added to NSBonjourServices on both platforms;
without it the browse fails for a reason unrelated to the permission.
The Xcode project deployment-target bumps (ios 13.0->15.0, macos 10.15->12.0)
are Flutter's own migration aligning project defaults with the Podfiles; they
happen on any first build.
Verified with real builds on both platforms, not just analysis: flutter build
macos --debug and flutter build ios --no-codesign both succeed, the framework
is linked in, and the preflight service type is present in both built
Info.plists. 35 tests cover the mapping, cache, concurrency and fail-open
behaviour.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- iOS: add the bikecontrol custom URL scheme to CFBundleURLTypes (it was only
registered on Android), so bikecontrol:// opens the app on iOS too.
- iOS: add the associated-domains entitlement (applinks:bikecontrol.app) for
Universal Links.
- Android: add a verified App Links intent-filter for
https://bikecontrol.app/app/... (autoVerify) alongside the bikecontrol://
scheme.
Universal/App Links additionally require the website AASA + assetlinks.json
(separate repo), which need the Apple Team ID and the Play App Signing SHA-256.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
App Store upload rejected the build (altool 90112): 'picture-in-picture' is
not a valid UIBackgroundModes value. The PiP gear overlay runs off the
existing 'audio' background mode, so just remove the bogus entry.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- The floating overlay's drag handle now fills the full 24px trailing slot
instead of only the 14px icon.
- iOS overlay: arm PiP only while still showing and tear it down if a hide
lands mid-start(), so a show/hide race can't orphan a frozen PiP window.
- Detect Dynamic Island via the max safe-area inset instead of the top inset,
which collapsed in landscape and could auto-start an unwanted PiP.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
With the virtual front derailleur on, the compact gear readout switches
from rear gear/total (14/25) to head-unit-style front×rear position
notation (small ring 1×N, large ring 2×N, e.g. 2×14) — matching how
Garmin/Wahoo display Di2/AXS gearing. With it off, it stays 14/25.
- Add tested formatGearReadout helper.
- Wire into the proxy card, debug menu, desktop second window + Android
PiP/overlay (trainer_overlay_view), and the gear hero card (2× · 50T).
- Carry frontShiftEnabled + frontRingLarge through TrainerOverlayState
(json, ==, hashCode, activity map) so the snapshot reaches the overlay
and the iOS surfaces.
- iOS PiP + Live Activity: format 2×N centrally in GearSnapshot.
- Standardize the off-state readout to 14/25 across all surfaces.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- New "Floating window (Picture-in-Picture)" overlay setting (iOS 16+). Default
follows the per-device auto behavior (on for iPad / non-DI iPhones, off for
Dynamic-Island iPhones); DI-iPhone users can opt in. The Live Activity keeps
running alongside it (additive).
- iPad: start PiP immediately on activation (foreground) instead of only when
backgrounded — there's screen room (DeviceCapabilities.prefersForegroundPip +
scheduleForegroundStart poll).
- DeviceCapabilities.isPipCapable (any iOS 16+ PiP device) + bike_control/pip_ios
"isCapable"; settings.getOverlayUsePip/setOverlayUsePip; show() resolves the
preference.
- requiresLinearPlayback = true to drop the PiP skip/scrub (next/prev) controls
(it's a live HUD; central play/pause is system chrome, harmless no-op).
- overlayUsePip + overlayUsePipSubtitle in all 6 languages; changelog updated.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AVSampleBufferDisplayLayer only presents IOSurface-backed CVPixelBuffers; the
pool omitted kCVPixelBufferIOSurfacePropertiesKey, so frames were accepted
(status=.rendering, no error) but never rendered — the PiP window stayed black.
Add IOSurface backing and mark each sample buffer DisplayImmediately (no control
timebase, live HUD feed). Also wires the PiP Swift files into the Runner /
TrainerActivity Xcode targets (GearSnapshot in both; GearSnapshot+LiveActivity
in the extension only so Runner needs no ActivityKit).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
deliver's screenshot upload races App Store Connect's async processing:
it duplicates locales ("too many screenshots", 05/06 dropped) and, even
when the count is right, orders them wrong (virtualshifting-settings
landed first on every locale). fastlane 2.236.1 is the latest, so this
is an inherent deliver limitation, not a version bug.
Replace the deliver screenshot path with a deterministic direct
Spaceship::ConnectAPI sync: clear each set (confirming the delete
actually committed, since ASC reports it optimistically), upload each
shot serialized with wait_for_processing and an explicit position, then
reorder by filename. deliver now only handles the localized texts
(skip_screenshots). Applies to both the iOS and macOS lanes.
Verified against the live 6.1 listing: all iOS locales (iPhone+iPad) and
all macOS locales now show 6 screenshots each in device → trainer →
virtualshifting → virtualshifting-settings → customization → companion
order, no duplicates.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
macOS shares the App Store record (same bundle id), so add an
upload_metadata_macos deliver lane that reuses the iOS listing texts
(same metadata_path) under platform osx, and run it from the metadata
workflow's iOS job on every upload. Screenshots use the desktop renders
(2560x1600 — a valid Mac size, framed like the others); the prepare
script now stages them into ios/fastlane/screenshots_macos (gitignored).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
deliver was leaving stale screenshots on App Store Connect across runs,
causing duplicate images, "too many screenshots" skips (it/pl) and
scrambled ordering. Set overwrite_screenshots as the canonical Deliverfile
default so each upload replaces the whole set.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Store Metadata workflow failed on first run: fastlane chdir's into the
fastlane/ folder before executing a lane, so the Fastfiles' project-dir-relative
paths resolved one level deep (e.g. android/fastlane/fastlane/service-account.json,
ios/fastlane/fastlane/asc_api_key.json) and the lanes couldn't find the key files
or metadata.
Anchor every path at the repo root via GITHUB_WORKSPACE (set by Actions; falls
back to two levels up from the Fastfile locally), so json_key, metadata_path,
screenshots_path, the API-key .p8/.json and the download-lane subprocess args are
all absolute and CWD-independent. Drop the now-redundant relative
SUPPLY_JSON_KEY_FILE env.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bring the fastlane/store-metadata branch up to date with 6.1. Resolved
.gitignore by keeping both sides' rules; prop fast-forwards to the
store_metadata commit (a descendant of 6.1's prop pin).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The localized App Store / Google Play listing text (titles, descriptions,
keywords, ...) was committed under ios/fastlane/metadata and
android/fastlane/metadata in this public repo, exposing the marketing/ASO copy.
Relocate it to the private prop submodule (prop/store_metadata/{ios,android})
and point fastlane at it; the public repo keeps only the lanes/workflow.
- ios/android Fastfiles: METADATA = "../prop/store_metadata/{ios,android}"
(lanes run from ios//android/, so ../prop is the repo-root submodule).
- prepare_store_screenshots.sh: Android images stage under the prop metadata
path; iOS screenshots unchanged.
- metadata.yml: checkout the prop submodule (submodules: recursive + PAT_TOKEN);
on download, commit & push the listing text to OpenBikeControl/prop (6.1) and
bump the submodule pointer here. PAT_TOKEN needs write access to prop.
- .gitignore / STORE_METADATA.md updated; screenshots stay public in ./screenshots.
- Bumps prop submodule to include the new store_metadata.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add scripts/prepare_store_screenshots.sh which maps the golden screenshots
produced by test/screenshot_test.dart (./screenshots/<scene>-<device>-<WxH>.png)
into the per-language layout fastlane expects:
- Google Play: phoneScreenshots (android) + tenInchScreenshots (androidTablet)
- App Store: iPhone 6.5" + iPad 12.9" images per locale (device detected by size)
The fastlane upload lanes now include screenshots (skip_upload_screenshots /
skip_screenshots disabled), and the 'Store Metadata' upload workflow runs the
prepare step first. Generated screenshot folders are gitignored so the images
stay sourced from the test output instead of being duplicated per language.
https://claude.ai/code/session_01Q3VrPge5KaXrrogqtbvGLZ
Manage localized store listings via fastlane (supply for Google Play,
deliver for the App Store) with one folder per language under
android/fastlane/metadata and ios/fastlane/metadata (en, de, fr, es, it, pl).
The txt files are seeded with the current live store data fetched from the
public Play Store and App Store listing pages. App Store listings are only
localized in English upstream, so the non-English iOS texts are translated
from the live en-US listing.
Adds a manually-triggered 'Store Metadata' GitHub Actions workflow to
download (store -> repo, auto-committed) or upload (repo -> store, texts only)
the metadata for either or both platforms, reusing the existing store secrets.
https://claude.ai/code/session_01Q3VrPge5KaXrrogqtbvGLZ
Manual signing requires one `provisioningProfiles` entry per embedded
bundle. Without an entry for `de.jonasbark.swiftcontrol.darwin.TrainerActivity`,
`flutter build ipa` fails with:
exportArchive "TrainerActivityExtension.appex" requires a provisioning
profile with the App Groups and Push Notifications features.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previously the close button only lived in the expanded Dynamic Island's
trailing region — invisible on the lock-screen banner and only revealed
on long-press for the island. Move it into `bottomRow`, which is shared
by both surfaces, so the user sees the button in the default lock-screen
view and the expanded island without any interaction.
The Dynamic Island trailing region goes back to showing the mode pill.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the SF Symbol "gear" (compactLeading) and "bicycle" (lock
screen / no-controls primary row) with the actual app icon.
Added an Assets.xcassets to the TrainerActivity widget extension
(the Runner's catalog isn't visible to the extension target) with
AppIcon@2x.png (120×120) and AppIcon@3x.png (180×180) copied from
the main app's AppIcon set. Referenced as `Image("AppIcon")` with
`.resizable().scaledToFit()` and a rounded-rect clip to match
iOS's standard app-icon shape.
The PBXFileSystemSynchronizedRootGroup membership for the
TrainerActivity folder auto-includes the new asset catalog in the
extension target — no project.pbxproj edits needed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the trailing mode pill in the Dynamic Island expanded
region (which was redundant — the bottom row already shows the
SIM/ERG pill) with an `xmark.circle.fill` button.
Tapping the button:
1. Fires a new `StopRideIntent` App Intent.
2. That intent posts a Darwin notification
`de.jonasbark.swiftcontrol.overlay.action.stop`.
3. `AppDelegate.swift`'s observer forwards `action: 'stop'` over
the `bike_control/overlay_actions_ios` MethodChannel.
4. `IosOverlayController._stopRide`:
- `core.connection.disconnectAll()`
- `core.connection.stop()`
- `core.settings.setOverlayEnabled(false)` so Navigation's
auto-show doesn't immediately re-open the activity on the
next BLE reconnect.
- `hide()` ends the Live Activity.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Flutter overlay was redesigned: row 1 is the big mode-aware primary
(gear N/M in SIM, target W in ERG), row 2 has the SIM/ERG pill plus
opted-in metrics (power · cadence · ×ratio in SIM). Mirror that shape
in the iOS Widget Extension:
- Lock Screen / banner: bicycle SF Symbol on the left, big primary
centered, mode pill + metrics on row 2.
- Dynamic Island expanded: leading = primary, trailing = mode pill,
bottom = metrics row.
- Compact-trailing: '14/24' in SIM, '<target>W' in ERG.
- Minimal: gear number or watts target.
Centralised reads into a TrainerSnapshot helper so the lock-screen view
and dynamic-island regions can't drift apart. iOS Live Activities are
display-only; the +/- controls field has no analogue here.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Xcode 16's PBXFileSystemSynchronizedRootGroup pulls every file in the
ios/TrainerActivity/ folder into the TrainerActivityExtension target by
default (Info.plist is the only membership exception). The leftover
TrainerActivity.entitlements (the actual one is ios/TrainerActivityExtension.entitlements)
and README.md from initial setup were getting bundled into the extension,
which may have confused the build.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two structural fixes after diffing against the package's working example:
- Revert ContentState to empty. The plugin's createActivity calls a
ContentState() constructor with no args from the example pattern; the
appGroupId field was a red herring from the plugin's internal type.
- Switch the widget's @available marker from iOS 16.1 to
iOSApplicationExtension 16.1, the correct platform key for an app
extension target. iOS 16.1 was being honored at compile time but the
WidgetKit registration uses the extension-specific availability scope.
- Inline the field reads inside the widget closures (matches the example
layout) instead of routing through a helper struct.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The plugin's internal LiveActivitiesAppAttributes.ContentState declares
'var appGroupId: String' and constructs Activity requests with that
field populated. Our widget declared an empty ContentState, so ActivityKit
rejected every launch with ActivityInput error 0 (malformedAttributes).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The package always launches Activity<LiveActivitiesAppAttributes> internally
and writes payload fields to the App Group's UserDefaults keyed by
"<id>_<fieldName>". Our custom TrainerActivityAttributes was never matched
by the system (ActivityInput error 0).
- Replace TrainerActivityAttributes with the package-required
LiveActivitiesAppAttributes (empty ContentState + UUID id + prefixedKey
helper extension).
- Rewrite TrainerActivity widget to read all fields from
UserDefaults(suiteName: "group.de.jonasbark.swiftcontrol.overlay") via
attributes.prefixedKey(...).
- Wrap the widget in a WidgetBundle gated on iOS 16.1 so the @main entry
point compiles on older deployment targets too.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Earlier reorder put Embed Foundation Extensions last, which kept the
cycle: ProcessInfoPlistFile → appex (in PlugIns/) → [CP] Copy Pods
Resources → [CP] Embed Pods Frameworks → Thin Binary → Info.plist →
appex.
Putting Embed Foundation Extensions before Thin Binary linearises the
graph: the appex is in PlugIns/ before any later phase reads Info.plist
or runs the [CP] Pods scripts, so nothing later needs to wait on it.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The xcconfig-level setting was not being honored by the Info.plist
processing step in Xcode 16, so the build cycle reappeared. Setting it
directly in all three Runner build configurations (Debug/Release/Profile)
in the pbxproj propagates to every step and breaks the cycle: with
AppIntents postprocessing off, ProcessInfoPlistFile no longer depends on
the embedded extension being copied first.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Flutter's Thin Binary script phase declared TARGET_BUILD_DIR/INFOPLIST_PATH
as an input. Once the TrainerActivityExtension is embedded, Info.plist
becomes dependent on the extension being copied, and that dependency
loops back through the [CP] Pods phases to Thin Binary itself.
The script has alwaysOutOfDate = 1 (always runs) and uses xcode_backend.sh
embed_and_thin which reads Info.plist via env at runtime — no need for an
input declaration. Removing it breaks the cycle without changing behavior.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>