Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,13 @@ jobs:
# tests SKIP here and run locally.
- name: Test
run: flutter test --concurrency=1 --reporter=expanded

# The WHOOP freeze goldens are per timezone (day labels are local), and
# the run above is UTC, so it only enforces the *_utc files and the other
# two skip. Re-run that one file under each committed offset. The Mi
# scale clock test reads the process zone and is a no-op under UTC, so it
# rides along.
- name: Zone-dependent tests (+05:30, -04:00)
run: |
TZ=Asia/Kolkata flutter test --concurrency=1 test/whoop_freeze_golden_test.dart test/adapters/miscale_test.dart
TZ=America/New_York flutter test --concurrency=1 test/whoop_freeze_golden_test.dart test/adapters/miscale_test.dart
9 changes: 0 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ lib/l10n/app_localizations*.dart
docs/*.gif
docs/*.mp4

# golden test failure output
test/failures/

# xcodebuild output from a direct target build
ios/build/

Expand All @@ -120,10 +117,4 @@ docs/internal/
# HRV/sleep payloads (RMSSD/SDNN/pNN50 tied to a calendar date). Never commit.
payload*.json

# Golden images. 416 PNGs, 27 MB, regenerated locally with
# `flutter test --update-goldens`. They are machine- and SDK-specific — the two
# Flutter SDKs on this machine already disagree on antialiasing — so a
# committed set is a diff nobody can review and a merge conflict nobody can
# resolve. The test code stays; the pictures do not.
test/goldens/
MULTIDEVICE_PROGRESS.md
38 changes: 38 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,16 @@
<array>
<string>61080001-8D6D-82B8-614A-1C8CB0F8DCC6</string>
<string>FD4B0001-CCE1-4033-93CE-002D5875F58A</string>
<string>180D</string>
<string>98ED0001-A541-11E4-B6A0-0002A5D5C51B</string>
<string>6E40FFF0-B5A3-F393-E0A9-E50E24DCCA9E</string>
<string>86F65000-F706-58A0-95B2-1FB9261E4DC7</string>
<string>FEE1</string>
<string>FED9</string>
<string>6A4E2800-667B-11E3-949A-0800200C9A66</string>
<string>1809</string>
<string>181B</string>
<string>181D</string>
<!-- 16-bit SIG member UUID. Distinct from the 128-bit vendor service
above, and NOT the Bluetooth-base expansion
0000FD4B-0000-1000-8000-00805F9B34FB (no band advertises that).
Expand Down Expand Up @@ -88,8 +97,26 @@
<string>WHOOP 4</string>
<key>FD4B0001-CCE1-4033-93CE-002D5875F58A</key>
<string>WHOOP 5</string>
<key>180D</key>
<string>Bluetooth heart rate sensor</string>
<key>98ED0001-A541-11E4-B6A0-0002A5D5C51B</key>
<string>Oura Ring</string>
<key>6E40FFF0-B5A3-F393-E0A9-E50E24DCCA9E</key>
<string>Colmi ring</string>
<key>86F65000-F706-58A0-95B2-1FB9261E4DC7</key>
<string>Ultrahuman Ring Air</string>
<key>FEE1</key>
<string>Mi Band 2/3</string>
<key>FED9</key>
<string>Pebble</string>
<key>6A4E2800-667B-11E3-949A-0800200C9A66</key>
<string>Garmin watch</string>
<key>1809</key>
<string>Bluetooth thermometer</string>
<key>181B</key>
<string>Mi Body Composition Scale</string>
<key>181D</key>
<string>Mi Smart Scale 2</string>
</dict>
<!-- GENERATED (see above): the declared services that belong to a SENSOR
paired through its own ASK picker, not to a band. AccessorySetup.swift
Expand All @@ -100,10 +127,21 @@
<key>NSAccessorySetupBluetoothCompanyIdentifiers</key>
<array>
<string>0x02B2</string>
<string>0x0157</string>
<string>0x0087</string>
</array>
<key>OSAskSensorServices</key>
<array>
<string>180D</string>
<string>98ED0001-A541-11E4-B6A0-0002A5D5C51B</string>
<string>6E40FFF0-B5A3-F393-E0A9-E50E24DCCA9E</string>
<string>86F65000-F706-58A0-95B2-1FB9261E4DC7</string>
<string>FEE1</string>
<string>FED9</string>
<string>6A4E2800-667B-11E3-949A-0800200C9A66</string>
<string>1809</string>
<string>181B</string>
<string>181D</string>
</array>
<!-- The automatic-backup folder lives in the app's Documents directory.
Without BOTH of these it exists but is invisible in Files, so nothing
Expand Down
7 changes: 5 additions & 2 deletions lib/ble/accessory_setup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import 'dart:io';

import 'package:flutter/services.dart';

import 'adapters/_registry.dart' show plistUuid;

class AccessorySetup {
static const _ch = MethodChannel('openstrap/accessory_setup');

Expand Down Expand Up @@ -74,10 +76,11 @@ class AccessorySetup {
/// the app has no standard Bluetooth authorization, so a sensor the user has
/// not approved here cannot be found by a scan at all (#371/#372). Each
/// service must be declared under `OSAskSensorServices`; the native side
/// refuses anything else. An already-approved sensor comes back with no sheet.
/// refuses anything else. Sent in [plistUuid] form (`180D`, not the 128-bit
/// expansion), the form the plist declares. An already-approved sensor comes back with no sheet.
static Future<String> showSensorPicker(List<String> services) async {
final id = await _ch.invokeMethod<String>('showPicker', <String, Object>{
'services': [for (final s in services) s.toUpperCase()],
'services': [for (final s in services) plistUuid(s)],
});
if (id == null || id.isEmpty) {
throw Exception('Pairing cancelled.');
Expand Down
Loading
Loading