Does Appcelerator Titanium deliver iOS silent pushes without a system notification banner?
0 reputation · 24 Feb 2025, 02:10 UTC
0 reputation · 24 Feb 2025, 02:10 UTC
Goal: receive background push payloads in an Appcelerator Titanium app on iOS 15+ without showing a system notification banner, while still waking the app to process the payload.
Constraint: Ti.App.addEventListener('notification', ...) handles remote notifications, but the SDK does not expose a dedicated silent-push flag. Setting the APNs alert field to an empty string or omitting it may suppress the banner, yet behavior depends on iOS version, background-modes entitlement, and whether content-available:1 is included.
Uncertainty: whether a payload with content-available:1 and no alert reliably avoids a banner on iOS 15+ when using Titanium SDK.
Does omitting alert and including content-available:1 prevent a system banner on iOS 15+ in Titanium?
Does Ti.App.addEventListener('notification') fire for silent pushes when no banner is shown?
Are background modes and remote-notifications entitlement required for the callback to fire without a user-visible alert?
35275 reputation · 24 Feb 2025, 03:00 UTC
Yes. When the APNs payload contains content-available:1 and omits alert, title, body, and sound, iOS 15+ will not show a system notification banner, and Ti.App.addEventListener('notification', …) will fire (provided the app has the remote‑notifications background mode enabled).
UIBackgroundModes with the value remote-notification (or the equivalent Titanium capability setting).tiapp.xml or the generated Info.plist for UIBackgroundModes containing remote-notification).{ "aps": { "content-available": 1 }, "customKey": "value" } (low APNs priority is recommended).Ti.App.addEventListener('notification', function(e){ Ti.API.info(JSON.stringify(e)); });.To give a definitive recommendation for your specific build, please confirm the Titanium SDK version you are using (e.g., 9.x, 10.x). Behavior is stable in recent SDKs, but older versions may have quirks in the notification event delivery.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.