Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
285c8e1
Merge pull request #484 from nightscout/release/0.2.4
dnzxy Apr 18, 2025
0309f6a
Merge pull request #489 from nightscout/release/0.2.5
dnzxy Apr 22, 2025
6237830
chore (codeowners): add marvout and remove js specific owners
Sjoerd-Bo3 May 25, 2025
3cb79bb
Improve shortcuts words and translation
avouspierre May 27, 2025
fc716a2
fix: Improve Live Activity reliability and restart mechanism
Sjoerd-Bo3 May 27, 2025
b9a8769
external insulin to shortcut
avouspierre May 29, 2025
539c589
Merge pull request #614 from bastiaanv/dev
kingst Jun 1, 2025
b5dee1f
CI: Bump APP_DEV_VERSION to 0.5.0.27 [skip ci]
github-actions[bot] Jun 1, 2025
7beef09
Config-based App Group independent of Trio BundleID (#558)
mountrcg Jun 1, 2025
dfd3ae6
CI: Bump APP_DEV_VERSION to 0.5.0.28 [skip ci]
github-actions[bot] Jun 1, 2025
8f8f750
Merge pull request #599 from Sjoerd-Bo3/fix/live-activity-reliability…
dnzxy Jun 1, 2025
5c78938
CI: Bump APP_DEV_VERSION to 0.5.0.29 [skip ci]
github-actions[bot] Jun 1, 2025
d48da61
Add confirmations before cancelling OR/TTs as it is in HomeRootView; …
marv-out Jun 1, 2025
ef0a934
Merge branch 'dev' of github.com:nightscout/Trio into confirmations
marv-out Jun 1, 2025
c5f72a7
Add guard for suspended pump in enactDetermination()
marv-out Jun 1, 2025
931715f
Merge branch 'dev' of github.com:nightscout/Trio into snoozeNoPodAlert
marv-out Jun 1, 2025
eadd9a3
Replace logic for check for backdated carbs with updated logic as well
marv-out Jun 1, 2025
ff4d60b
Check if this is a backdated entry by comparing with the default date…
marv-out Jun 2, 2025
7de421b
- Remove 400 guard in trio-oref
dnzxy Jun 2, 2025
60ea397
Remove leftover != 400 condition in trio-oref; rebundle
dnzxy Jun 3, 2025
151ac2e
Create unit_tests.yml: Automated unit tests on push and PR to `main` …
bjornoleh Jun 3, 2025
97b1c44
Allow to run for any repository owner for testing.
bjornoleh Jun 3, 2025
40af9f3
Use different fetch limits for determine basal vs autosens
kingst Jun 4, 2025
74f3e9c
Update CODEOWNERS
dnzxy Jun 4, 2025
7b81456
build_trio.yml: check for the presence of alive-main and alive-dev in…
bjornoleh May 22, 2025
0e71cc6
chore(release): Prepare release: Bump version to 0.2.6
dnzxy Jun 4, 2025
a2fa4cb
Merge pull request #619 from marv-out/carbBackdating
dnzxy Jun 4, 2025
90d0ea4
CI: Bump APP_DEV_VERSION to 0.5.0.30 [skip ci]
github-actions[bot] Jun 4, 2025
7df9b1e
Merge pull request #617 from marv-out/confirmations
dnzxy Jun 4, 2025
a3dcd0b
CI: Bump APP_DEV_VERSION to 0.5.0.31 [skip ci]
github-actions[bot] Jun 4, 2025
756f3ef
Merge branch 'dev' into unit_tests_ci
bjornoleh Jun 4, 2025
7afc730
Add caching and GitHub Actions optimizations to unit test workflow
bjornoleh Jun 4, 2025
d6ac9d6
Merge pull request #581 from nightscout/update-codeowners
dnzxy Jun 4, 2025
8076a2d
Merge pull request #618 from marv-out/snoozeNoPodAlert
dnzxy Jun 5, 2025
8608b2a
CI: Bump APP_DEV_VERSION to 0.5.0.32 [skip ci]
github-actions[bot] Jun 5, 2025
f8b8366
Add 500 mg/dL to condition to cater for U.S./CA Libres
dnzxy Jun 5, 2025
ccdeddd
Rename variable in prepare/determine_basal.js, removed commented out …
dnzxy Jun 5, 2025
6107efc
Remove commented out code and no longer needed init()
dnzxy Jun 5, 2025
c0f5a04
Merge pull request #593 from avouspierre/shortcuts_543
dnzxy Jun 5, 2025
2c89712
CI: Bump APP_DEV_VERSION to 0.5.0.33 [skip ci]
github-actions[bot] Jun 5, 2025
6ab3ef3
Merge branch 'dev' into unit_tests_ci
dnzxy Jun 5, 2025
6d20da2
Merge branch 'dev' into fix-glucose-checks
dnzxy Jun 5, 2025
56d44c3
Merge branch 'dev' into fix-autosens-glucose-fetch-limit
dnzxy Jun 5, 2025
db72813
Merge pull request #622 from nightscout/fix-glucose-checks
kingst Jun 5, 2025
29ac896
CI: Bump APP_DEV_VERSION to 0.5.0.34 [skip ci]
github-actions[bot] Jun 5, 2025
e2217f8
Crowdin Updates 2025-06-05
t1dude Jun 5, 2025
d8a5d1e
Merge pull request #632 from nightscout/release/0.2.6
dnzxy Jun 5, 2025
88818e6
Merge branch 'dev' of https://github.com/nightscout/Trio into release…
dnzxy Jun 5, 2025
1beb1a4
Merge pull request #633 from nightscout/release/0.2.6 [skip ci]
dnzxy Jun 5, 2025
2fc1004
Merge pull request #636 from t1dude/crowdin
dnzxy Jun 5, 2025
87b9588
CI: Bump APP_DEV_VERSION to 0.5.0.35 [skip ci]
github-actions[bot] Jun 5, 2025
50fc39d
Fix breaking comma in AddCarbPresentIntent
dnzxy Jun 5, 2025
9d6c307
Merge pull request #638 from nightscout/fix-addcarbpresentintent
bjornoleh Jun 5, 2025
28f0d37
CI: Bump APP_DEV_VERSION to 0.5.0.36 [skip ci]
github-actions[bot] Jun 5, 2025
274d079
Merge branch 'dev' into fix-autosens-glucose-fetch-limit
dnzxy Jun 6, 2025
177b759
Merge pull request #629 from kingst/fix-autosens-glucose-fetch-limit
dnzxy Jun 6, 2025
9f4c983
CI: Bump APP_DEV_VERSION to 0.5.0.37 [skip ci]
github-actions[bot] Jun 6, 2025
dc7abd6
Logging
marv-out Jun 6, 2025
a2205b4
Merge pull request #640 from marv-out/logging
dnzxy Jun 6, 2025
16367ef
CI: Bump APP_DEV_VERSION to 0.5.0.38 [skip ci]
github-actions[bot] Jun 6, 2025
5249cc4
Merge branch 'dev' into unit_tests_ci
dnzxy Jun 7, 2025
1189a20
Sync rebundled trio-oref and adjust function names
dnzxy Jun 9, 2025
b2a6479
Fix missed variable to rename
dnzxy Jun 9, 2025
5b87472
Ensure unit tests action only runs in upstream repo and on PR/push hook
dnzxy Jun 9, 2025
ae26c1b
Fix app icon
MikePlante1 Jun 10, 2025
4515fdc
Add Daily versions of glucose percentile and distribution charts
MikePlante1 May 31, 2025
d5c0666
Add column to GlucoseSectorChart
MikePlante1 May 31, 2025
3298c84
Display 100% instead of 100.0%
MikePlante1 Jun 1, 2025
b397ee7
Relabel charts from "by time" to "over time"
MikePlante1 Jun 10, 2025
6c5b0d6
Remove default from `isSameTimeUnit`
MikePlante1 Jun 10, 2025
684edb0
Update Max IOB help tip
MikePlante1 Jun 11, 2025
9bcd6b1
Remove deleted setting from search
MikePlante1 Jun 11, 2025
807fe9d
Merge pull request #654 from MikePlante1/max-iob-help
dnzxy Jun 11, 2025
2d9cd0c
CI: Bump APP_DEV_VERSION to 0.5.0.39 [skip ci]
github-actions[bot] Jun 11, 2025
75a384b
Merge pull request #649 from MikePlante1/icon-fix
dnzxy Jun 11, 2025
7c05ae6
CI: Bump APP_DEV_VERSION to 0.5.0.40 [skip ci]
github-actions[bot] Jun 11, 2025
3eef7bd
Merge pull request #648 from dnzxy/update-js-bundling
dnzxy Jun 11, 2025
7a3d03b
CI: Bump APP_DEV_VERSION to 0.5.0.41 [skip ci]
github-actions[bot] Jun 11, 2025
01c10a0
Merge branch 'dev' into unit_tests_ci
dnzxy Jun 11, 2025
80e001f
Merge pull request #625 from bjornoleh/unit_tests_ci
dnzxy Jun 11, 2025
9fe84fa
CI: Bump APP_DEV_VERSION to 0.5.0.42 [skip ci]
github-actions[bot] Jun 11, 2025
837e038
typo
MikePlante1 Jun 12, 2025
e98506b
Cleanup unused codee
MikePlante1 Jun 12, 2025
73af98c
Replace GlucoseStored with NSManagedObjectID
MikePlante1 Jun 13, 2025
ec4a3fe
Remove unnecessary `@MainActor`s
MikePlante1 Jun 13, 2025
cb4ac64
Remove unnecessary sorting
MikePlante1 Jun 13, 2025
0743993
Revert "Remove unnecessary sorting"
MikePlante1 Jun 13, 2025
8c7fa24
Pass state instead of using Environment var
MikePlante1 Jun 13, 2025
49b89be
Merge branch 'dev' into daily-stats
MikePlante1 Jun 13, 2025
7d22b70
Update Table of Identifiers
MikePlante1 Jun 13, 2025
244ca7c
Merge pull request #658 from MikePlante1/testflight-md
MikePlante1 Jun 13, 2025
b85d709
CI: Bump APP_DEV_VERSION to 0.5.0.43 [skip ci]
github-actions[bot] Jun 13, 2025
e694f1c
update to fastlane 2.228.0
marionbarker Jun 13, 2025
b365b95
Merge branch 'dev' into hotfix/dev_fastlane_2.228.0
marionbarker Jun 13, 2025
6b89856
Merge pull request #659 from nightscout/hotfix/dev_fastlane_2.228.0
dnzxy Jun 14, 2025
f2e6146
CI: Bump APP_DEV_VERSION to 0.5.0.44 [skip ci]
github-actions[bot] Jun 14, 2025
5f9ef7d
fix: Prevent Data race in fetchForecastHierarchy() function in BaseDe…
marv-out Jun 15, 2025
a6b61b7
Merge branch 'dev' of github.com:nightscout/Trio into dataRace
marv-out Jun 15, 2025
1acfd4b
fix: edit NSPredicate to exclude the date check for indefinite overrides
marv-out Jun 15, 2025
e4dc46a
Display as iPhone app on iPad
MikePlante1 Jun 16, 2025
dcccf8f
Merge branch 'dev' into daily-stats
MikePlante1 Jun 17, 2025
c97ef91
Merge pull request #668 from MikePlante1/ipad
dnzxy Jun 17, 2025
23fe974
CI: Bump APP_DEV_VERSION to 0.5.0.45 [skip ci]
github-actions[bot] Jun 17, 2025
f1a9678
Merge pull request #662 from marv-out/dataRace
dnzxy Jun 18, 2025
3803111
CI: Bump APP_DEV_VERSION to 0.5.0.46 [skip ci]
github-actions[bot] Jun 18, 2025
72aa43b
Merge pull request #664 from marv-out/overrides
dnzxy Jun 18, 2025
3dac852
CI: Bump APP_DEV_VERSION to 0.5.0.47 [skip ci]
github-actions[bot] Jun 18, 2025
eec3cc2
Merge branch 'dev' into daily-stats
MikePlante1 Jun 18, 2025
1d9e0f5
Remove "(over time)" from name
MikePlante1 Jun 18, 2025
e8c00de
l18n
MikePlante1 Jun 18, 2025
414a039
combine compactMap operations; use functional approach and assign the…
marv-out Jun 20, 2025
0430bc6
fix: Fix Swift 6 error in startBackgroundTask method
marv-out Jun 21, 2025
9a3ac8c
load initial determination in LiveActivityManager
10nas Jun 22, 2025
942f7e3
remove redundant and dead code in LiveActivityManager
10nas Jun 22, 2025
2dd905f
Merge pull request #613 from MikePlante1/daily-stats
dnzxy Jun 22, 2025
e85242d
CI: Bump APP_DEV_VERSION to 0.5.0.48 [skip ci]
github-actions[bot] Jun 22, 2025
1a9a722
cleanup for simplification in LiveActivityManager. Restore existing LA
10nas Jun 23, 2025
9121663
Merge pull request #675 from 10nas/fix_missing_live_activity_determin…
dnzxy Jun 23, 2025
bd45f66
CI: Bump APP_DEV_VERSION to 0.5.0.49 [skip ci]
github-actions[bot] Jun 23, 2025
0879906
Disable flaky tests
kingst Jun 23, 2025
b95fe2c
Merge pull request #683 from kingst/remove-flaky-tests
dnzxy Jun 24, 2025
db468af
CI: Bump APP_DEV_VERSION to 0.5.0.50 [skip ci]
github-actions[bot] Jun 24, 2025
31edb6f
Hotfix to main: Use a special version of fastlane to enable Add Ident…
marionbarker Jun 24, 2025
eedec21
Hotfix/add identifiers: Bring in updates to restore Add Identifiers t…
marionbarker Jun 25, 2025
8790033
update log
10nas Jun 26, 2025
4d78df0
Update external insulin bolus
avouspierre Jun 29, 2025
2355f7b
Merge pull request #688 from 10nas/live_activity_cleanup_and_persiste…
marv-out Jul 2, 2025
6af0c0a
CI: Bump APP_DEV_VERSION to 0.5.1.1 [skip ci]
github-actions[bot] Jul 2, 2025
e4b0931
update OmniXXX: handle interrupted bolus during pod fault correctly
marionbarker Jul 2, 2025
2ca26fb
Prepare release: Bump version to 0.2.8
marionbarker Jul 2, 2025
0b3ee49
Merge pull request #673 from marv-out/backgroundTasks
kingst Jul 2, 2025
2dfd2cf
CI: Bump APP_DEV_VERSION to 0.5.1.2 [skip ci]
github-actions[bot] Jul 2, 2025
1b5fa97
don't show live activity when turned off in Trio settings
10nas Jul 3, 2025
3f6cf1d
Merge pull request #694 from 10nas/fix_respect_live_activity_enabled
marv-out Jul 3, 2025
9003c4f
CI: Bump APP_DEV_VERSION to 0.5.1.3 [skip ci]
github-actions[bot] Jul 3, 2025
f8d4e43
Merge latest dev, address PR comments
marv-out Jul 3, 2025
9398132
Distinguish between external and non-external insulin in confirmation…
marv-out Jul 3, 2025
0b7c977
Merge branch 'dev' of github.com:nightscout/Trio into external-insuli…
marv-out Jul 3, 2025
435c9d9
Merge pull request #607 from avouspierre/external-insulin-to-shortcut
marv-out Jul 3, 2025
132d0f3
CI: Bump APP_DEV_VERSION to 0.5.1.4 [skip ci]
github-actions[bot] Jul 3, 2025
5a5bc20
Fixes a race condition between share client and BLE for G6 CGMs
kingst Jul 5, 2025
bc26bbd
Merge pull request #692 from nightscout/release/0.2.8
MikePlante1 Jul 7, 2025
a2aad96
Merge pull request #703 from kingst/fix-dexcom-share
dnzxy Jul 7, 2025
ac033f4
CI: Bump APP_DEV_VERSION to 0.5.1.5 [skip ci]
github-actions[bot] Jul 7, 2025
8d7d9a7
Merge branch 'main' into update_dev_from_main
marionbarker Jul 7, 2025
a0c9e79
Adds handling for plugin CGM managers to backfill glucose
kingst Jul 10, 2025
0fc58f6
Merge pull request #711 from nightscout/update_dev_from_main
MikePlante1 Jul 10, 2025
e44909c
Fix filtering logic
kingst Jul 11, 2025
01d54bb
Merge pull request #714 from kingst/backfill-glucose-from-cgm-manager
kingst Jul 16, 2025
f929a84
chore: update DanaKit
bastiaanv Jul 16, 2025
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
3 changes: 1 addition & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* @dnzxy @bjornoleh @MikePlante1 @aug0211 @AndreasStokholm @Sjoerd-Bo3 @t1dude
*.js @dnzxy @bjornoleh @MikePlante1 @aug0211 @AndreasStokholm @Sjoerd-Bo3 @t1dude @jeremystorring
* @dnzxy @bjornoleh @MikePlante1 @AndreasStokholm @Sjoerd-Bo3 @t1dude @marv-out
132 changes: 132 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: zzz [DO NOT RUN] Automated unit tests

on:
pull_request:
branches:
- dev
types: [opened, synchronize]
paths-ignore:
- '**.md'
- '**/README'
- '**.yml'
- '**.txt'

push:
branches:
- dev
paths-ignore:
- '**.md'
- '**/README'
- '**.yml'
- '**.txt'

jobs:
test:
name: Run Unit Tests
runs-on: macos-15
if: github.repository_owner == 'nightscout'

steps:
- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_16.3.app/Contents/Developer

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive

- name: Restore cache
id: cache-restore
uses: actions/cache/restore@v4
with:
path: |
/Users/runner/Library/Developer/Xcode/DerivedData
.build
key: ${{ runner.os }}-trio-${{ hashFiles('**/*.swift', '**/*.xcodeproj', '**/*.xcworkspace') }}
restore-keys: |
${{ runner.os }}-trio-

- name: Show cache contents before build
run: |
echo "📂 Contents of DerivedData:"
ls -lah /Users/runner/Library/Developer/Xcode/DerivedData || echo "Directory not found"
echo ""
echo "📂 Contents of .build:"
ls -lah .build || echo ".build directory not found"

- name: Build for testing
run: |
set -o pipefail && \
time xcodebuild build-for-testing \
-workspace Trio.xcworkspace \
-scheme "Trio Tests" \
-destination 'platform=iOS Simulator,name=iPhone 16,OS=18.4' \

- name: Check for uncommitted changes
run: |
CHANGES=$(git status --porcelain)
if [ -n "$CHANGES" ]; then
echo "Uncommitted changes detected:"
echo "$CHANGES"
echo "$CHANGES" | while read -r line; do
FILE=$(echo $line | cut -c4-)
echo "::warning file=$FILE::Uncommitted change detected"
done
exit 0
else
echo "No uncommitted changes detected."
fi
shell: bash

- name: Show cache contents after build
run: |
echo "📂 Updated DerivedData contents:"
du -sh /Users/runner/Library/Developer/Xcode/DerivedData || echo "Directory not found"
ls -lah /Users/runner/Library/Developer/Xcode/DerivedData || echo "Directory not found"
echo ""
echo "📂 Updated .build contents:"
du -sh .build || echo ".build directory not found"
ls -lah .build || echo ".build directory not found"

- name: Save cache
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
/Users/runner/Library/Developer/Xcode/DerivedData
.build
key: ${{ runner.os }}-trio-${{ hashFiles('**/*.swift', '**/*.xcodeproj', '**/*.xcworkspace') }}

- name: Run tests
run: |
set -o pipefail
time xcodebuild test-without-building \
-workspace Trio.xcworkspace \
-scheme "Trio Tests" \
-destination 'platform=iOS Simulator,name=iPhone 16,OS=18.4' \
$([ "$ENABLE_PARALLEL_TESTING" = "true" ] && echo "-parallel-testing-enabled YES") \
2>&1 | tee xcodebuild.log

- name: Annotate test results
if: always()
run: |
if [ -f xcodebuild.log ]; then
if grep -q "Failing tests:" xcodebuild.log; then
echo "::error title=Unit Tests Failed::Some tests failed"
echo "## ❌ Some tests failed:" >> $GITHUB_STEP_SUMMARY
grep -A 20 "Failing tests:" xcodebuild.log | \
grep -E '^\s+[A-Za-z0-9]+\..+\(\)' | \
sed 's/^/ - /' >> $GITHUB_STEP_SUMMARY
echo "::group::Failed Test List"
grep -A 20 "Failing tests:" xcodebuild.log | \
grep -E '^\s+[A-Za-z0-9]+\..+\(\)' | \
sed 's/^/ - /'
echo "::endgroup::"
else
echo "::notice title=Unit Tests Passed::✅ All tests passed"
echo "✅ All tests passed" >> $GITHUB_STEP_SUMMARY
fi
else
echo "::warning::Test log (xcodebuild.log) not found"
fi
31 changes: 23 additions & 8 deletions Config.xcconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
// Some of the items can be modified to match the user's preference
APP_DISPLAY_NAME = Trio
APP_VERSION = 0.5.0
APP_DEV_VERSION = 0.5.0.26
APP_BUILD_NUMBER = 1
COPYRIGHT_NOTICE =
DEVELOPER_TEAM = ##TEAM_ID##
BUNDLE_IDENTIFIER = org.nightscout.$(DEVELOPMENT_TEAM).trio
APP_ICON = trioBlack
APP_URL_SCHEME = Trio

// Optional overrides
// DEVELOPER_TEAM will be set to your Apple Developer ID - typically using ConfigOverride.xcconfig
DEVELOPER_TEAM = ##TEAM_ID##

// Typically this is not modified unless you want to create a separate (unique) app using your ID
// It must include $(DEVELOPMENT_TEAM)
// For example: myOwnApp.$(DEVELOPMENT_TEAM).trio
BUNDLE_IDENTIFIER = org.nightscout.$(DEVELOPMENT_TEAM).trio

// Danger zone - do not modify these unless you know what you are doing

// The TRIO_APP_GROUP_ID should not be modified - it is required to have this exact format
// to build with GitHub actions and to work with xDrip4iOS
TRIO_APP_GROUP_ID = group.org.nightscout.$(DEVELOPMENT_TEAM).trio.trio-app-group

// The developers set the version numbers, please leave them alone
APP_VERSION = 0.5.1
APP_DEV_VERSION = 0.5.1.5
APP_BUILD_NUMBER = 1
COPYRIGHT_NOTICE =

// Optional overrides - these can be used to insert your TEAMID into the DEVELOPER_TEAM field
#include? "../../ConfigOverride.xcconfig"
#include? "../ConfigOverride.xcconfig"
#include? "ConfigOverride.xcconfig"
#include? "ConfigOverride.xcconfig"
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
source "https://rubygems.org"

gem "fastlane"
# gem "fastlane"

# This branch uses fastlane 2.228.0 plus pr 29596
gem "fastlane", git: "https://github.com/loopandlearn/fastlane.git", ref: "a670d4b092b274d58ebb5497126e47fc6a84f533"
120 changes: 63 additions & 57 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
GIT
remote: https://github.com/loopandlearn/fastlane.git
revision: a670d4b092b274d58ebb5497126e47fc6a84f533
ref: a670d4b092b274d58ebb5497126e47fc6a84f533
specs:
fastlane (2.228.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored (~> 1.2)
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
fastlane-sirp (>= 1.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-env (>= 1.6.0, < 2.0.0)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
http-cookie (~> 1.0.5)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (>= 0.1.1, < 1.0.0)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.5)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (~> 3)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.4.1)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)

GEM
remote: https://rubygems.org/
specs:
Expand All @@ -9,26 +57,26 @@ GEM
public_suffix (>= 2.0.2, < 7.0)
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.2)
aws-partitions (1.1086.0)
aws-sdk-core (3.222.1)
aws-eventstream (1.4.0)
aws-partitions (1.1116.0)
aws-sdk-core (3.225.2)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
base64
jmespath (~> 1, >= 1.6.1)
logger
aws-sdk-kms (1.99.0)
aws-sdk-core (~> 3, >= 3.216.0)
aws-sdk-kms (1.105.0)
aws-sdk-core (~> 3, >= 3.225.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.183.0)
aws-sdk-core (~> 3, >= 3.216.0)
aws-sdk-s3 (1.189.1)
aws-sdk-core (~> 3, >= 3.225.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.11.0)
aws-sigv4 (1.12.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
base64 (0.3.0)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
Expand Down Expand Up @@ -70,48 +118,6 @@ GEM
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.4.0)
fastlane (2.227.1)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored (~> 1.2)
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
fastlane-sirp (>= 1.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-env (>= 1.6.0, < 2.0.0)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
http-cookie (~> 1.0.5)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (>= 0.1.1, < 1.0.0)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.5)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (~> 3)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.4.1)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-sirp (1.0.0)
sysrandom (~> 1.0)
gh_inspector (1.1.3)
Expand Down Expand Up @@ -157,7 +163,7 @@ GEM
httpclient (2.9.0)
mutex_m
jmespath (1.6.2)
json (2.10.2)
json (2.12.2)
jwt (2.10.1)
base64
logger (1.7.0)
Expand All @@ -167,13 +173,13 @@ GEM
multipart-post (2.4.1)
mutex_m (0.3.0)
nanaimo (0.4.0)
naturally (2.2.1)
naturally (2.3.0)
nkf (0.2.0)
optparse (0.6.0)
os (1.1.4)
plist (3.7.2)
public_suffix (6.0.1)
rake (13.2.1)
public_suffix (6.0.2)
rake (13.3.0)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
Expand All @@ -184,7 +190,7 @@ GEM
ruby2_keywords (0.0.5)
rubyzip (2.4.1)
security (0.1.5)
signet (0.19.0)
signet (0.20.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
Expand Down Expand Up @@ -226,7 +232,7 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
fastlane
fastlane!

BUNDLED WITH
2.6.2
9 changes: 6 additions & 3 deletions Model/Helper/GlucoseStored+helper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ extension GlucoseStored {
return request
}

static func glucoseIsFlat(_ glucose: [GlucoseStored]) -> Bool {
guard glucose.count >= 6 else { return false }
static func glucoseIsHIGH(_ glucose: [GlucoseStored]) -> Bool {
guard glucose.count >= 4 else { return false }

let firstValue = glucose.first?.glucose

return glucose.allSatisfy { $0.glucose == firstValue }
/// 400 mg/dL covers all Dexcom CGMs as well as European Libre 2 and most readings from xDrip4iOS.
/// U.S. / Canadian Libres can emit up to 500 mg/dL until it reads "HI"
/// Our condition considers both these values, 400 and 500, as possible "flat" readings when paired CGM reads HIGH.
return glucose.allSatisfy { $0.glucose == firstValue && ($0.glucose == 400 || $0.glucose == 500) }
}

// Preview
Expand Down
Loading