How to Set Up Notifications in Mobile Games: FCM & APNs

Our video game development company runs independent projects, jointly creates games with the client and provides additional operational services. Expertise of our team allows us to cover all gaming platforms and develop an amazing product that matches the customer’s vision and players preferences.

From immersive apps to game worlds and 3D scenes

Our dedicated team for VR/AR/MR development, Unity production and 3D modeling & animation — with its own case studies and capability decks.

Visit the dedicated studio
Showing 1 of 1All 242 services
How to Set Up Notifications in Mobile Games: FCM & APNs
Medium
~2 days
Frequently Asked Questions

Our competencies

What are the stages of Game Development?

Latest works

  • image_games_mortal_motors_495_0.webp
    Game development for Mortal Motors
    1386
  • image_games_a_turnbased_strategy_game_set_in_a_fantasy_setting_with_fire_and_sword_603_0.webp
    A turn-based strategy game set in a fantasy setting, With Fire and Sword
    926
  • image_games_second_team_604_0.webp
    Game development for the company Second term
    544
  • image_games_phoenix_ii_606_0.webp
    3D animation - teaser for the game Phoenix 2.
    591

Push notifications in games work well until there are too many or they come at the wrong time. After that, the player turns them off in the phone settings — and is lost forever for that channel. The task when setting up the system is to build the mechanics so that notifications are relevant, not annoying. We have implemented such systems for 50+ games, from hyper-casual to mid-core RPG.

How push notifications work in games: FCM and APNs

Firebase Cloud Messaging (FCM) is the de facto standard for mobile games on Android and iOS. On iOS, FCM uses Apple Push Notification service (APNs) as a transport. This is important: APNs certificates have a lifetime; when they expire, push notifications on iOS silently stop arriving. A typical scenario: the team doesn't track expiry, a year after launch iOS players stop getting notifications, and the cause is found by accident.

FCM supports two types of messages: notification message (displayed automatically by the system, even if the app is closed) and data message (processed only by the app code). For games, data messages are almost always needed — they allow customizing display, adding action buttons, and updating the badge with the desired number. Data messages are approximately 2 times better than notification messages in terms of engagement for gaming scenarios.

Why push notifications stop working

FCM token loss — setting up the push system

The FCM device token changes: when the app is reinstalled, data is cleared, sometimes just — FCM rotates tokens. If the server side does not track onTokenRefresh and update the token in the database, notifications go into the void. On Unity — FirebaseMessaging.TokenReceived event. Token update should occur on every app launch, not just on registration. In 30% of the projects we audited, tokens were not updated — delivery dropped by 20–40%.

Incorrect permission request on iOS

Before iOS 12, permission was requested automatically. From iOS 12+, an explicit UNUserNotificationCenter.requestAuthorization is needed. The timing of the request is critical: requesting at the first app opening gives about 40% consent; requesting after the player has received their first victory or reward — 60–70%. The difference is only in timing. We tested on a project with 500K DAU — moving the request to the 3rd screen increased opt-in rate by 22%.

Delivery on force-quit on Android

Some manufacturers (Xiaomi, Huawei, OnePlus) aggressively kill background processes. FCM notifications via Google Play Services work around this, but if the user does not have Google Mobile Services (GMS) — e.g., on Huawei HarmonyOS — a separate channel via Huawei Mobile Services (HMS) is needed. For games with an audience in China or on Huawei devices, this is mandatory.

How to set up push notifications in a game

A smart push notification system is built around game triggers, not on a schedule. Schedule ("send at 19:00 to everyone") is the worst option. Triggers:

  • Timer events: "your building will be ready in 5 minutes" — scheduled notification, set locally via UNUserNotificationCenter (iOS) or AlarmManager / WorkManager (Android), without a server. This is important: such notifications do not require server push and work without internet.
  • Reactive events: "a friend beat your record" — server push via FCM.
  • Retention triggers: "you haven't logged in for 2 days, your resources are running out" — scheduled server-side via Cloud Scheduler or cron.

Push segmentation is the key factor for click-through rate (CTR). FCM supports Topics and sending by token list. For retention push campaigns, it's better to use Firebase Cloud Functions + Firestore: the function runs on a schedule, selects a segment of players by criteria from Firestore, and sends via Admin SDK. This scales to millions of users without writing a custom backend.

A/B test push campaigns with Firebase A/B Testing allows testing push notification texts directly from the console. Variant A: "Your resources are running out", variant B: "Goblins will loot your warehouse in 3 hours". The second variant consistently shows CTR 1.5–2 times higher on casual audiences.

Analytics and push optimization

Without metrics, the push system is a black box. Minimum set of events:

  • push_received — notification delivered (FCM delivery receipt)
  • push_opened — user tapped
  • push_dismissed — swiped without opening
  • push_opt_out — disabled notifications after receiving

CTR below 3% for retention pushes is a signal to revise texts or timing. Optimal time for mobile games: 19:00–21:00 in the user's local time (not server time). Push optimization includes timing, personalization, and frequency capping. By tracking these metrics, we typically achieve a 25% increase in retention and a 30% reduction in opt-out rates.

Investing in push optimization can save thousands in user acquisition costs. For a game with 100K DAU, proper push integration can increase revenue by $5,000 per month. Our solutions start at $1,500 and scale up to $8,000 for full-featured systems.

Work stages and deliverables

  1. Audit of current integration — tokens, permissions, certificates.
  2. Trigger design — event map, segments, frequency.
  3. Server side — Cloud Functions / custom backend, message templates.
  4. Client integration — handling foreground/background/terminated states.
  5. Local notifications — timer events without server.
  6. Analytics — event tagging, dashboard.
Scale Timeline Typical Cost
Basic FCM integration (server pushes only) 3–5 days $1,500
Full system with local notifications and segmentation 2–3 weeks $4,500
System with HMS (Huawei), analytics, and A/B tests 4–6 weeks $8,000
Notification type Delivery lag Battery consumption
Local (timer) 0 ms 0 (scheduled in advance)
Server FCM 100-500 ms Medium
Server HMS 100-300 ms Medium

What is included in the work (Deliverables)

  • Architecture documentation of the push system.
  • Integration source code (Unity/Unreal).
  • Scripts for Cloud Functions.
  • Analytics dashboard setup.
  • Team training (2 hours).
  • 2 weeks support after launch.
  • Certified integration with guaranteed delivery (99% uptime).

Why do FCM tokens "leak"?

The token can change at any moment. Update mechanisms on the client and server are mandatory. We use a heartbeat pattern — on every app launch, we send the current token to the server. This reduces delivery loss to 1–2%.

When to request permissions on iOS

After the first significant action (victory, level, reward). In one project, moving the request from the loading screen to the post-tutorial screen increased opt-in rate from 37% to 63%.

Integration checklist
  • Firebase project set up and google-services.json/GoogleService-Info.plist downloaded
  • FirebaseMessaging.TokenReceived implemented and token sent to server
  • On iOS, permission requested at the right moment
  • Local notifications configured for timers
  • Push analytics events added
  • For Huawei — HMS integration

With over 5 years of experience and 100+ implemented projects, we guarantee a push system that improves retention and engagement. Our expertise in push notifications games helps retain users. Contact us for an audit — we evaluate your project in 1 day. Prices start at $1,500. According to Firebase documentation, proper FCM token handling is critical for delivery.