From e5e76211df00563b60d6df3a5037843b3035a6c5 Mon Sep 17 00:00:00 2001 From: ifBars Date: Sat, 3 Oct 2026 17:16:02 -0700 Subject: [PATCH] fix(phone): report app discovery and initialization failures --- S1API/Internal/Patches/HomeScreen.Start.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/S1API/Internal/Patches/HomeScreen.Start.cs b/S1API/Internal/Patches/HomeScreen.Start.cs index 2ab1b915..f51b943f 100644 --- a/S1API/Internal/Patches/HomeScreen.Start.cs +++ b/S1API/Internal/Patches/HomeScreen.Start.cs @@ -46,12 +46,16 @@ static void Postfix(HomeScreen __instance) ExternalAppCatalog.Clear(ExternalAppFamily.Phone); // Re-register all PhoneApps var phoneApps = ReflectionUtils.GetDerivedClasses(); + Logger.Msg($"Discovered {phoneApps.Count} custom phone app type(s)."); foreach (var type in phoneApps) { - Logger.Debug($"Found phone app: {type.FullName}"); - if (type.GetConstructor(Type.EmptyTypes) == null) + { + Logger.Warning($"Skipping phone app {type.FullName}: a public parameterless constructor is required."); continue; + } + + Logger.Msg($"Initializing phone app: {type.FullName}"); try { @@ -62,7 +66,7 @@ static void Postfix(HomeScreen __instance) } catch (Exception e) { - Logger.Warning($"[PhoneApp] Failed to register {type.FullName}: {e.Message}"); + Logger.Warning($"Failed to register phone app {type.FullName}: {e}"); } } }