summaryrefslogtreecommitdiff
path: root/source/app
diff options
context:
space:
mode:
authorcirakg <cirakg@cirakg.xyz>2026-10-18 21:10:37 +0200
committercirakg <cirakg@cirakg.xyz>2026-10-18 21:10:37 +0200
commit773df56883b9961b607a1994920f5ef5299423b8 (patch)
treee813e8f975e3cfa7a992222e5bf63ef615469916 /source/app
parent2292bf700d28ade39cf2d64b45509e6db21034bc (diff)
feat(app): add minimal watch app with smoke test and per-size icons
The M0 placeholder app: AppBase entry point, home screen with name and version, debug-only diagnostics (start-up time, memory) and a unit test that runs in the headless simulator. Builds with strict type checking and zero warnings for all 72 products; icons.jungle gives every product a launcher icon of its exact size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'source/app')
-rw-r--r--source/app/AppInfo.mc16
-rw-r--r--source/app/OtpWalletApp.mc40
2 files changed, 56 insertions, 0 deletions
diff --git a/source/app/AppInfo.mc b/source/app/AppInfo.mc
new file mode 100644
index 0000000..5b2a586
--- /dev/null
+++ b/source/app/AppInfo.mc
@@ -0,0 +1,16 @@
+// Author: cirakg & claude ai
+// Summary: Build-time facts about the app, such as its semantic version.
+//
+// AppInfo: build-time facts about the app.
+//
+// VERSION follows semantic versioning (README section 22). It is shown on the
+// home screen now and in the About screen and settings later; keep it equal to
+// the newest version in CHANGELOG.md once releases start.
+
+import Toybox.Lang;
+
+module AppInfo {
+
+ // Semantic version of the app: MAJOR.MINOR.PATCH.
+ const VERSION = "0.1.0";
+}
diff --git a/source/app/OtpWalletApp.mc b/source/app/OtpWalletApp.mc
new file mode 100644
index 0000000..8858878
--- /dev/null
+++ b/source/app/OtpWalletApp.mc
@@ -0,0 +1,40 @@
+// Author: cirakg & claude ai
+// Summary: Application entry point (Connect IQ AppBase): lifecycle and first view.
+//
+// OtpWalletApp: the application entry point (Connect IQ AppBase).
+//
+// M0 skeleton: the app shows a home screen with its name and version. Later
+// milestones add the vault, settings processing, locking and the glance.
+//
+// Connect IQ lifecycle: initialize -> onStart -> getInitialView -> (views run)
+// -> onStop.
+//
+// Security note for later milestones: onStop is where every key and decrypted
+// secret gets wiped. It runs when the user leaves the app, and also when
+// Garmin's system passcode shuts running apps down.
+
+import Toybox.Application;
+import Toybox.Lang;
+import Toybox.WatchUi;
+
+class OtpWalletApp extends Application.AppBase {
+
+ function initialize() {
+ AppBase.initialize();
+ // Start of the start-up timer reported by `make perf` (debug builds only).
+ Diag.markStart();
+ }
+
+ // Called after the app is loaded, before the first view is shown.
+ function onStart(state as Dictionary?) as Void {
+ }
+
+ // Called when the app exits, for any reason.
+ function onStop(state as Dictionary?) as Void {
+ }
+
+ // The first screen and its input handler.
+ function getInitialView() as [Views] or [Views, InputDelegates] {
+ return [new HomeView(), new HomeDelegate()];
+ }
+}