feat: migration of APNS to FCM for IOS messages - #89
Merged
Conversation
Add ingestion for the new push-<game>_ios-(single|massive) topics so the GCM pusher can consume iOS messages alongside the existing Android ones. - Extend topic regex in config and common.go to match the ios platform - Add Platform field to KafkaMessage and populate it from the topic - Subscribe pusher gcm to ios single/massive topics for every gcm app - Cover new parsing and consumer behavior with unit tests
…tion feat: ingest iOS push notifications via FCM Kafka topics
Adds a Platform field to interfaces.Message and resolves the platform
("gcm" or "ios", with empty string falling back to "gcm") from
KafkaMessage.Platform at the top of HandleMessages. The resolved value
is threaded through dedup, rate limiting, the duplicate-detected stat,
sendPush, HandleResponses, and every feedback/stats reporter call —
replacing the hardcoded "gcm" literals so iOS messages are tagged
correctly across observability paths.
The Firebase client still produces Android-style payloads, so this is
non-breaking until upstream services start publishing on _ios-* topics.
…-handler feat(firebase): thread platform through message handler
toFirebaseMessage branches on Message.Platform: "ios" routes to buildIOSMessage, anything else (including the empty default) keeps the existing Android logic via buildAndroidMessage. buildIOSMessage produces a messaging.APNSConfig with apns-collapse-id, apns-priority and apns-expiration headers (when the corresponding Message fields are set), and an Aps payload covering alert title/body/loc-keys/loc-args, sound, badge (parsed from string to int, silently dropped if not numeric) and content-available for silent pushes.
feat(firebase): build APNS payload for iOS messages
gmurayama
reviewed
May 13, 2026
gmurayama
requested changes
May 13, 2026
Per Apple's APNs spec, every request should declare apns-push-type so APNs can route and validate it. The value must match the payload: "background" for silent (content-available-only) pushes, "alert" otherwise. Background pushes also force apns-priority to 5, since APNs rejects background pushes sent with priority 10.
gmurayama
approved these changes
May 14, 2026
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.
Adds iOS push-notification support to the GCM/Firebase pusher so iOS messages can be delivered via FCM instead of the legacy APNS code path. The migration is staged across three commits so each step is independently reviewable and the final state is non-breaking until upstream producers start writing to the new topics.
What changes
Compatibility & rollout