Use environment for appName and replace hardcoded Loop with appName#120
Conversation
|
The open PR 118 will modify some of these strings. Hold off on this for now.
|
|
Now that PR #118 is merged, I revisited this PR.
The current version of BeepPreference is picking up the default value from LoopKit - details below. Details: To test this:
UncertaintyRecoveredView.swift works as expected:
BeepPreference.swift is not working as expected:
I am still missing a step. |
| // This picks up the DefaultValue from LoopKit, not the CFBundleDisplayName | ||
| //@Environment(\.appName) var appName | ||
| // ToDo - insert the appName properly | ||
| let appName: String = "the app" |
There was a problem hiding this comment.
Why not use the environment with the real app name? If you have questions about how to set it, I can help. If you want to use "the app", it would be better just to hard code it.
There was a problem hiding this comment.
Please help. I prefer appName.
|
When I tested it, it didn’t work. It used the defaultValue from LoopKit. See a previous comment where I demonstrated this. |
|
@ps2 I know I went ahead and merged this. But will happily update with a new PR if you provide help in making it work to use appName from the environment. To reiterate the problem, this picks up the defaultValue from LoopKit instead of the appName from the environment that I expected. I prefer to fix this the "right" way. Perhaps it is a LoopKit/LoopKit PR that is needed. |


UncertaintyRecoveredView.swiftnow updates withMAIN_APP_BUNDLE_IDENTIFIERThere are 3 files that use hard-code "Loop" in stringsThis PR updates 2 of them so farTest: