How ethank511/my-garmin-app works
1. Repository purpose
- This is a Garmin Connect IQ watch face app written in Monkey C.
- The architecture is centered on a small on-device application that renders a custom watch face, likely with weather-themed imagery.
2. Core runtime boundary
- The main runtime code lives in source/.
- source/MyWatchFaceApp.mc is the application entry/lifecycle layer.
- source/MyWatchFace.mc is the watch-face view/rendering layer that draws the UI on the device.
- This is a typical split in Connect IQ: app orchestration versus visual watch-face logic.
3. UI and presentation assets
- Assets/Backgrounds (Weather)/ contains background imagery used by the watch face.
- Assets/Icons/ contains icon assets, likely for weather conditions or status indicators.
- These assets are presentation-only and are consumed indirectly through the resource system rather than referenced as loose files at runtime.
4. Resource subsystem
- resources/resources.xml is the central resource manifest.
- resources/strings/strings.xml contains localized or user-facing text.
- resources/drawables/ is the drawable resource bundle, bridging source code to image assets.
- In Connect IQ, this resource layer is important because the generated resource IDs are what the Monkey C code uses at runtime.
5. Generated resource code
- build/gen/.../source/Rez.mcgen is generated from the resource definitions.
- This file is an internal build artifact that gives the source code typed access to compiled resources.
- Architecturally, it sits between the asset catalog and the runtime code, but it should not be edited manually.
6. Build and packaging pipeline
- build.jungle and build.properties define the Garmin build process.
- The output build/WeatherWatchFace.prg is the packaged app artifact deployed to a watch or simulator.
- The build/ tree also contains intermediate compiled MIR artifacts and resource caches, showing a standard compile-and-package pipeline.
7. Platform metadata and configuration
- manifest.xml defines app metadata, device compatibility, permissions/capabilities, and the app entry points used by Garmin tooling.
- projectInfo.xml holds project-level configuration for the Connect IQ toolchain.
- These files shape what devices the app can run on and how the build is assembled.
8. Signing and distribution
- developer_key.der and developer_key.pem are signing credentials used to package or sideload the app.
- temp_key.pem suggests a temporary or locally generated signing key used during development.
- This is an important boundary because packaging is tied to device trust and deployment, not just compilation.
9. Build outputs and internal artifacts
- build/internal-mir/ and build/external-mir/ contain compiled Monkey C intermediate artifacts.
- These are not source of truth; they reflect the compiler’s internal output for the app and its resources.
- build/gen/resources/cache/ shows resource compilation caching, which supports faster incremental builds.
10. Testing and automation
- test.sh likely wraps build or validation steps for local development.
- Since there is no larger service/backend visible, the app’s primary “integration surface” is the Garmin build/deploy toolchain rather than external APIs.
11. Likely data flow
- Assets and strings are declared in resources/.
- The build system converts them into generated resource bindings.
- MyWatchFaceApp initializes the app context and hands control to MyWatchFace.
- MyWatchFace reads device state and resource IDs to render the final face on the watch.
12. Architecture summary
- The repo is organized into a source layer, a resource/asset layer, and a Connect IQ build/package layer.
- The main functional boundary is between compiled watch-face logic and packaged visual resources.
- There is no evidence here of a separate backend, web service, or cloud synchronization system; the app appears self-contained on the Garmin device.
Main entry points: WeatherWatchFace.prg Packaged app · Rez.mcgen Rez bindings · resources.xml Resource manifest · drawables Drawables
Components 22
Source
Runtime Monkey C watch-face code
- App lifecycle · Application entry and lifecycle orchestration
source/MyWatchFaceApp.mc - Watch face · Main rendering and device UI logic
source/MyWatchFace.mc
Resources
Strings, drawables, and asset catalogs
- Resource manifest · Central resource declaration file
resources/resources.xml - Strings · User-facing and localized text resources
resources/strings/strings.xml - Drawables · Drawable resource layer bridging code to images
resources/drawables - Weather art · Background imagery for the watch face
Assets/Backgrounds (Weather) - Icons · Iconography for conditions and indicators
Assets/Icons
Build
Generated artifacts and packaging pipeline
- Rez bindings · Generated typed resource access layer
build/gen/006-B4625-00/source/Rez.mcgen - Resource cache · Incremental resource compilation cache
build/gen/resources/cache/ic7a8e8dd.mbc - Internal MIR · Compiler intermediate output for resources
build/internal-mir/Rez.mir - App MIR · Compiled Monkey C intermediate for app code
build/external-mir/home/speedye/my-garmin-app/source/MyWatchFaceApp.mir - Face MIR · Compiled Monkey C intermediate for watch-face code
build/external-mir/home/speedye/my-garmin-app/source/MyWatchFace.mir - Packaged app · Final Garmin application package
build/WeatherWatchFace.prg - Debug map · Debug metadata for the packaged app
build/WeatherWatchFace.prg.debug.xml
Config
Tooling metadata and signing inputs
- Build script · Garmin build definition
build.jungle - Build props · Build properties and packaging settings
build.properties - Manifest · App entry points, permissions, and device compatibility
manifest.xml - Project info · Connect IQ project-level configuration
projectInfo.xml - Developer cert · Signing credential used for packaging
developer_key.der - Dev key · Developer private key for signing
developer_key.pem - Temp key · Temporary local signing key
temp_key.pem - Test script · Local build or validation wrapper
test.sh
Connections 27
- Resource manifest → Strings: declares · Resource manifest includes string resources
- Resource manifest → Drawables: declares · Resource manifest includes drawable resources
- Drawables → Weather art: packages · Drawable layer packages background artwork
- Drawables → Icons: packages · Drawable layer packages icon artwork
- Resource manifest → Rez bindings: generates · Resource definitions generate typed bindings
- Strings → Rez bindings: binds · Strings are exposed through generated resource code
- Drawables → Rez bindings: binds · Drawables are exposed through generated resource code
- Rez bindings → App lifecycle: used by · App lifecycle code accesses generated resources
- Rez bindings → Watch face: used by · Watch-face rendering code accesses generated resources
- App lifecycle → Watch face: creates · Application hands off to the watch-face view
- Build script → Packaged app: drives · Build definition packages the final app
- Build props → Packaged app: configures · Build properties shape packaging output
- Manifest → App lifecycle: launches · Manifest defines app entry and runtime behavior
- Manifest → Watch face: launches · Manifest wires in the watch-face component
- Project info → Build script: supports · Project configuration supports the build toolchain
- App lifecycle → App MIR: compiles to · App source compiles into MIR
- Watch face → Face MIR: compiles to · Watch-face source compiles into MIR
- Resource manifest → Internal MIR: compiles to · Resource layer produces internal MIR artifact
- App MIR → Packaged app: packages into · Compiled app code is packaged into the PRG
- Face MIR → Packaged app: packages into · Compiled watch-face code is packaged into the PRG
- Internal MIR → Packaged app: packages into · Compiled resource artifact is packaged into the PRG
- Resource cache → Rez bindings: accelerates · Cache supports incremental resource generation
- Developer cert → Packaged app: signs · Signing credential used in package creation
- Dev key → Packaged app: signs · Private key used in package creation
- Temp key → Packaged app: signs · Temporary signing key used during development
- Test script → Build script: invokes · Test script likely wraps the Garmin build process
- Debug map → Packaged app: describes · Debug metadata corresponds to the packaged binary