-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add mmol watchapp units support. Add modularLarge complication. Change complication time to relative time. #379
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
Add mmol watchapp units support. Add modularLarge complication. Change complication time to relative time. #379
Conversation
Dev update
Dev update
…tive. Adds modularLarge complication.
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.
Thanks Matt! I'll charge up my apple watch so I can try this out. Looks like good changes!
Loop.xcodeproj/project.pbxproj
Outdated
| CODE_SIGN_ENTITLEMENTS = Loop/Loop.entitlements; | ||
| CODE_SIGN_IDENTITY = "iPhone Developer"; | ||
| DEVELOPMENT_TEAM = ""; | ||
| DEVELOPMENT_TEAM = HG99VQQ8VF; |
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.
These need to be reverted.
| "7" : "21849667-AD99-4107-BDAE-64914E038CA6.json" | ||
| }, | ||
| "client ID" : "com.loudnate.Loop.watchkitapp.watchkitextension" | ||
| "client ID" : "com.walker0.Loop.watchkitapp.watchkitextension" |
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.
revert this as well
| guard let glucose = context?.glucose, | ||
| let unit = context?.preferredGlucoseUnit | ||
| else { | ||
| glucoseLabel.setHidden(true) |
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.
Indentation off
| @@ -1,16 +0,0 @@ | |||
| /* | |||
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.
Any change made to the complication code requires a manual regeneration of this bundle file, which can be done in the watch simulator.
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.
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'm having problems with it generating the correct files at the moment. I did regenerate them before I added this PR but it clearly didn't add in the other file. I will look into this now and resolve it.
|
|
||
| let glucoseText = CLKSimpleTextProvider.localizableTextProvider(withStringsFileTextKey: "120↘︎", shortTextKey: "120") | ||
| let timeText = CLKTimeTextProvider(date: Date()) | ||
| let timeText = CLKRelativeDateTextProvider(date: Date(), style: .natural, units: .minute) |
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.
Does this fit on the smaller complications?
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 believe it does. It is reactive to available space so it should fit. I haven't ever been able to get the utilitarian large complication to work to test that one, nor have I looked into why. This change definitely works for modular small as well as the large version though.
|
Tested the changes in my Dev setup and it works well - Thanks Matt |
|
In testing, I am seeing that complications are sometimes blanking out. And it seems like the utilitarian complications aren't filling in values properly: I just get strings like "Loop", or "@@ @". These may be existing issues, but could you look into them? *update: The complications eventually appeared, once Loop was green. I would expect that if I had current bg values, but was having pump comms issues, that it would still show. Regarding merging this PR, the one concern I have left is that the change from absolute time to relative time introduces more uncertainty about how recent the measurement actually is, since complications don't always update in a timely manner. |
|
@ps2 the @@@ on utilitarian complications are an existing issue. I'll see if I can figure them out. Do you know of any of the other complications affected? I'm unsure what you mean by this third comment. The relative time display counts even when it isn't updated. It will always show the delta between current time and the BG time |
|
Ok, yes, you're right about relative time. That sounds good then. |
-Adds support for decimals in the watchApp for mmol users.
-Adds modularLarge complication. ( currently in modularLargeTallBody form with only BG but happy to change it to add more info the future)
-Changes complication time to relative time for ease of interpretation when glancing at the watch.