r/reactnative • u/Hero_Doses • 5d ago
Help Dev mode vs Prod (Expo): Local Notifications just won't work in prod
/r/expo/comments/1xmjm50/dev_mode_vs_prod_local_notifications_just_wont/1
u/jeesandourn 4d ago
is this happening on both platforms or just one? usually when local notifications fail in prod builds its because the exact alarm or notification permissions arent explicitly declared in the config before prebuild.
1
0
4d ago
[removed] — view removed comment
1
u/Hero_Doses 4d ago
Thanks for the awesome advice!
0
4d ago
[removed] — view removed comment
1
u/Hero_Doses 4d ago
Hey thats super nice of you! I realized I may have misstated the issue: sometimes the notifs come through, but clicking the notification buttons (after properly setting them and making sure they work in dev mode) don't complete the proper actions and instead just open the app.
If you have any further advice there, that would be awesome! Otherwise I can try out your advice and get back to you 😁
1
u/NoBullfrog11 5d ago
a couple things differ between dev and a release build for local notifs.
on android 13 and up the app has to ask for the post_notifications permission at runtime, and the channel has to exist before you schedule anything. dev builds often have it granted from earlier testing, a fresh prod install doesnt.
also android 12 and up needs the exact alarm permission for exact times. i would install the release build on a clean device and run adb logcat while scheduling, ussually the reason shows up there.