Firebase Cloud Messaging (FCM) can deliver push notifications to iPhones, but it doesn't talk to iOS devices directly — it goes through Apple Push Notification service (APNs). Most “Firebase iOS push isn't working” problems come from the Apple side of that handshake. This guide sets up both sides in order.
How Firebase push works on iOS
Your app registers with APNs and receives an APNs device token. The Firebase iOS SDK maps that token to an FCM registration token, which is the one your server uses. When you send a message, FCM authenticates with APNs using the key you uploaded, and APNs delivers it to the device. If Firebase can't authenticate with APNs, nothing arrives — even though everything looks fine in your app.
Prerequisites
- A paid Apple Developer Program membership — push needs one.
- A Firebase project with your iOS app added, and its
GoogleService-Info.plist. - Xcode and a physical iPhone or iPad. The Simulator isn't a reliable test for remote push.
1. Create an APNs authentication key
- In the Apple Developer portal, open Certificates, Identifiers & Profiles → Keys and create a new key.
- Enable Apple Push Notifications service (APNs) for the key, then register it.
- Download the
.p8file and note its Key ID. Apple lets you download it only once, so store it somewhere safe. - Note your Team ID, shown in your developer account's membership details.
An authentication key doesn't expire like a push certificate, and one key works for all your apps — which is why it's the recommended option over the older .p12 certificates.
2. Upload the key to Firebase
In the Firebase console, open Project settings → Cloud Messaging. Under your Apple app, upload the .p8 key and enter the Key ID and Team ID. Firebase uses this key to authenticate with APNs on your behalf.
3. Add the Firebase iOS SDK
In Xcode, choose File → Add Package Dependencies and add https://github.com/firebase/firebase-ios-sdk. Select the FirebaseMessaging product. Then drag GoogleService-Info.plist into your app target.
4. Enable capabilities
Select your app target, open Signing & Capabilities, and add Push Notifications. Add Background Modes and check Remote notifications if you send silent or data-only pushes.
5. Request permission and get the FCM token
Configure Firebase at launch, ask the user for permission, register for remote notifications, and listen for the FCM token:
import UIKit
import FirebaseCore
import FirebaseMessaging
import UserNotifications
@main
class AppDelegate: UIResponder, UIApplicationDelegate,
UNUserNotificationCenterDelegate, MessagingDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
Messaging.messaging().delegate = self
UNUserNotificationCenter.current().delegate = self
UNUserNotificationCenter.current().requestAuthorization(
options: [.alert, .badge, .sound]
) { granted, error in
// Respect the user's choice; you can ask again later from settings
}
application.registerForRemoteNotifications()
return true
}
// Called with a new or refreshed FCM registration token
func messaging(_ messaging: Messaging,
didReceiveRegistrationToken fcmToken: String?) {
guard let fcmToken else { return }
// Send this token to your push server
print("FCM token: \(fcmToken)")
}
// Show notifications while the app is in the foreground
func userNotificationCenter(_ center: UNUserNotificationCenter,
willPresent notification: UNNotification) async
-> UNNotificationPresentationOptions {
[.banner, .sound, .badge]
}
}By default the Firebase SDK uses method swizzling to pass the APNs token to FCM automatically. If you set FirebaseAppDelegateProxyEnabled to NO in your Info.plist, you must pass the APNs token yourself by setting Messaging.messaging().apnsToken in didRegisterForRemoteNotificationsWithDeviceToken.
6. Send a test notification
Run the app on a physical device, accept the permission prompt, and copy the FCM token from the console. In the Firebase console, open Messaging, create a notification, and use Send test message with that token. Test with the app in the foreground, in the background, and fully closed.
Why Firebase iOS push isn't working
- No APNs key in Firebase: the token is generated, but nothing is delivered. Check Project settings → Cloud Messaging.
- Wrong Team ID or Key ID: APNs rejects Firebase's requests. Re-enter both from your Apple developer account.
- Bundle ID mismatch: the iOS app in Firebase must use exactly the same bundle ID as your Xcode target.
- Push Notifications capability missing: the app never receives an APNs token, so no FCM token works.
- Swizzling disabled without passing the APNs token: FCM has no APNs token to map.
- Permission denied: the user declined the prompt; notifications are delivered silently or not shown.
Using React Native or Flutter?
The Apple-side steps — APNs key, Firebase upload, and capabilities — are the same. The notifySphere SDKs handle the token and permission code for you: see the React Native guide and the Flutter guide. notifySphere runs on Firebase Cloud Messaging, so once your Firebase project can reach APNs, uploading its service account lets you send segmented iOS, Android, and web campaigns from one dashboard.