When a notification is tapped while the app is killed, the payload never reaches the BEAM — Mob.Device.take_launch_notification/0 returns :none. Taps while the app is running or backgrounded work fine, which makes this easy to miss.
The cause is in both native stores: mob_set_launch_notification (android/jni/mob_nif.zig) and mob_set_launch_notification_json (ios/mob_nif.m) return early if their mutex doesn't exist yet. But the mutex is created in nif_load, and on a cold start MainActivity / the app delegate store the payload before the BEAM boots — so the cold-start store is always a no-op, on both platforms.
mob_set_opened_document right next door handles the same window correctly: it stores even before the mutex exists, with a comment explaining why that's safe (nothing reads the global until the take_ NIF, which can only run after nif_load).
Repro: force-stop an app that routes notification taps, send or schedule a notification, tap it from the tray — take_launch_notification returns :none.
Hit this wiring FCM push into a mob app. #77 has a fix (same pre-mutex pattern as opened_document, both platforms).
When a notification is tapped while the app is killed, the payload never reaches the BEAM —
Mob.Device.take_launch_notification/0returns:none. Taps while the app is running or backgrounded work fine, which makes this easy to miss.The cause is in both native stores:
mob_set_launch_notification(android/jni/mob_nif.zig) andmob_set_launch_notification_json(ios/mob_nif.m) return early if their mutex doesn't exist yet. But the mutex is created innif_load, and on a cold start MainActivity / the app delegate store the payload before the BEAM boots — so the cold-start store is always a no-op, on both platforms.mob_set_opened_documentright next door handles the same window correctly: it stores even before the mutex exists, with a comment explaining why that's safe (nothing reads the global until thetake_NIF, which can only run afternif_load).Repro: force-stop an app that routes notification taps, send or schedule a notification, tap it from the tray —
take_launch_notificationreturns:none.Hit this wiring FCM push into a mob app. #77 has a fix (same pre-mutex pattern as
opened_document, both platforms).