Skip to content

Conversation

@marionbarker
Copy link
Contributor

I am not able to test this but this matches code used successfully by the iAPS community.

@marionbarker
Copy link
Contributor Author

I modified the start up message to be more generic: "This app" instead of "Loop".

@Franeczek
Copy link

.

@ps2
Copy link
Contributor

ps2 commented Apr 9, 2024

Did you test this? Is appname being set for G7?

@marionbarker
Copy link
Contributor Author

I tested modifying appName, but I'm sure I did it the "wrong" way.

  • Modify MAIN_APP_DISPLAY_NAME in LoopConfigOverride.xcconfig to appNameRename and that is what is displayed as the display name for the app
    • after a phone reboot, that also shows up as name for app in Settings and Health Data Sources
    • But "Loop" is still shown as the appName in the G7SensorKit string

Modified LoopKit/LoopKitUI/Extensions/Environment+AppName.swift (line 14) from:

  • static let defaultValue = "Loop"
    to:
  • static let defaultValue = "HardCodedSwift"
  • Now "HardCodedSwift" shows up in the G7SensorKit string

This is the screen with that change to the code and French selected as the language.

hard-coded-defaultValue-g7-french

@ps2
Copy link
Contributor

ps2 commented Apr 9, 2024

App name needs to be injected into the environment, like this: .environment(\.appName, Bundle.main.bundleDisplayName); search, and you'll see an example of that in the onboarding. Eventually we hope that this will just be done once at the Loop level, and not at each plugin, but since plugins vend UIKit views instead of SwiftUI views; we have to do this for now.

@marionbarker
Copy link
Contributor Author

I modified the PR to just have the one on-topic modification.

@ps2 ps2 merged commit eba7d98 into LoopKit:main Apr 10, 2024
@marionbarker marionbarker deleted the add_dexcom_one_plus branch February 16, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants