Repository navigation
iOS: keep foreground notifications in Notification Center (MOB-353) - #206
Merged
Merged
Conversation
willPresent answered Banner|Sound only. Without UNNotificationPresentationOptionList, iOS 14+ does not add a notification that arrived while the app was open to Notification Center, so once the banner timed out it was gone. Add List.
GenericJam
force-pushed
the
mob-353-notification-list
branch
from
October 15, 2026 17:18
5d94293 to
3e45264
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes MOB-353.
MobNotificationDelegate'swillPresentNotification:(ios/mob_nif.m) completed withBanner | Sound. WithoutUNNotificationPresentationOptionList, iOS 14+ doesn't add a notification that arrived while the app was in the foreground to Notification Center, so once the banner timed out it was gone. NowBanner | List | Sound. No deployment-target impact:Banneris already iOS 14+, and every build path compiles mob_nif.m for iOS 17.0.Verification: iOS 27 simulator (iPhone 17, D134E7BC), before and after. The delegate lives in mob_nif.m, which needs erl_nif, and
test/native/only compiles standalone headers, so the harness can't reach it. A harness test of the options constant would only restate the fix, so there is no automated test.mix mob.new --ios --blankapp plusmob_notify(Hex), with:mobandmob_dirpointed at this branch. A button callsMobNotify.schedule(socket, delay_seconds: 3, …), and mount requests:notifications. Permission was granted on the sim.{:notification, %{presentation: :foreground, source: :local}}and the banner showed. After the banner went (~45 s), I opened Notification Center: the entry "MOB-353 foreground / Should stay in Notification Center — 1m ago" is there (screenshot taken).Docs: guides/push_notifications.md says that on iOS a foreground notification stays in Notification Center. CHANGELOG under Unreleased.
Review: reviewer subagent (Codex rate-limited until 12:17 PM today): MERGE. One nitpick (a CHANGELOG sentence about Android overstated heads-ups), fixed.