-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Live Activity #2191
base: dev
Are you sure you want to change the base?
feature: Live Activity #2191
Conversation
Bump version to 3.5.0 to signify dev branch
Love the draft/prototype! Would love to see this make it into the project down the line I think it looks amazing! |
Built onto my real phone. Thanks so much for making this available. 👍 |
I have been using this for several days - I really enjoy having it attached to Loop. Bug report:
Feature requests:
|
Thanks for all the feedback:
Preview
|
Nice upgrade except the override appears confused.
|
The walking override started at 1:47 with a duration of 3 hours and was cancelled 19 minutes later.
|
I did a bit more testing.
|
fd0b8e5
to
03d5489
Compare
Sorry to be slow testing this. Also, IMO, the Save button should be inactive unless there is a change to save. Then when it is tapped to save a change, the Save button should be inactive again. |
I did more testing - this is with an SE so I can only look at the lock screen - there is no dynamic island. When Also, the two sliders for |
Reverted always on feature, since Apple doesn't allow a live activity to be created in the background. Only in the foreground or via push notifications. Also added the change to have the save button disabled while there are no changes |
Summary:
Tests:I have not tested this in a while. It seems to have the same issue we see in other features where you make a change, and the change is actually implemented, but it doesn't show up on the view. By going to another screen (or quit/restart the app) you can force the refresh for that screen with current values. This happens for some Therapy Settings and Algorithm Experiment selections as well. It appears to be new with iOS 18. This is an Issue reported for one display glitch and a PR proposed for another one:
I think we need a uniform fix for this for iOS 18. Screens can show old settingsI did some testing with the screen where you can choose which 4 blocks you want on the bottom row on the lockscreen. The changes showed up on the Live Activity, but if I returned to the Bottom Row design in Loop, they showed the old selection. A quit/restart updated the view so my current selections were shown. Save Button always activeThe save button is still always active whether a change was made or not. Features workedExcept for the display glitches mention above, all features and changes worked as expected. Graphics of ControlsSome of the controls are shown on the screenshots below. Graphics on LockscreenThe screenshots below show the lock screen
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve this PR, but acknowledge it is subject to some UI glitches on some of the control views.
In practice, most people will configure the Live Activity layout one time and leave it alone. I have not modified the layout for mine since I last tested this PR.
However, if the UI glitches can be fixed easily, they should be.
Hi, |
Hi @mns6754 , I am afraid not. Your health care provider needs to changes their Loop build to include LA. Docs: https://www.loopandlearn.org/loop-features-in-development/#live-activity |
Thank you, Bastiaan, for the clarification |
StatusLive Activity controls work as expected. TestTest again with the latest updates. Focus on the whether the configuration displays the just-modified selections after a change. (Before they were enacted, but the screen did not update right away.) ConfigurationIPhone SE 3rd gen, running iOS 18.3.2
Test Save Button and Configuration DisplayThe Save button acts appropriately again (see this comment for details). This behavior is related to iOS 18 - older tests for this PR were with iOS 17. Initially, the Live Activity screen Save button was inactive
Comprehensive Tests for Save Button and Configuration DisplayTests below include looking at the Live Activity on the Lock Screen. For "success", the LA must match the displayed configuration. Repeat test for all rows on the Live Activity screen:
Test Bottom Row configuration screenTests below include looking at the Live Activity on the Lock Screen. For "success", the LA must match the displayed configuration.
|
Loop.xcodeproj/project.pbxproj
Outdated
@@ -4832,6 +4921,7 @@ | |||
INFOPLIST_FILE = "Loop Widget Extension/Bootstrap/Info.plist"; | |||
INFOPLIST_KEY_CFBundleDisplayName = "Loop Widgets"; | |||
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 LoopKit Authors. All rights reserved."; | |||
IPHONEOS_DEPLOYMENT_TARGET = 16.2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this change (found 8 times) from the pbxproj file.
Instead update Loop.xcconfig
and change this section:
from:
// Min iOS Version [DEFAULT]
IPHONEOS_DEPLOYMENT_TARGET = 15.1
to:
// Min iOS Version [DEFAULT]
IPHONEOS_DEPLOYMENT_TARGET = 16.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I commented on the need to use Loop.xcconfig to change IPHONEOS_DEPLOYMENT_TARGET. Withdrawing approval until that is updated.
@marionbarker Change request is pushed! |
Resolution NeededThis code does not build as is because of 2 problems. Once I resolved both of these in my local copy of your feat/live-activity branch, the code built and live-activity is displayed on my test phone (SE 3rd generation).
This is from dev branch, and those lines are also there in feat/live-activity branch (at lines 5085 and 5195).
The lines with hard-coded values in |
It's ok to remove IPHONEOS_DEPLOYMENT_TARGET settings in this PR. |
@marionbarker fixed! branch is up-to-date with dev and removed the extra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Status
All good. LGTM.
Test
Begin with LoopWorkspace dev clone.
In Loop, switch to this branch and rebuild.
Build works as expected.
When built on a phone that supports Dynamic Island, the glucose shows up in the Dynamic Island when Live Activity is enabled.
The Live Activity, on the Lock Screen, works for
- SE 3rd running iOS 18.3.2
- iPhone 8 running iOS 16.7.10
This PR is an initial/basic version of this Live Activity, without any feature which are spoken of in the Zulipchat.
Look & Feel:
Lock Screen (all iPhone's):
Dynamic Island (iPhone 14 pro max and higher):
Settings
Things to know:
CurrentBG
,IOB
,COB
,UpdatedAt
(like in the screenshots)GlucoseStore.glucoseSamplesDidChange
CarbStore.carbEntriesDidChange
dosing changing
UIApplication.willEnterForegroundNotification