Skip to content

iOS Push Notifications Not Working with Firebase Cloud Messaging (FCM) - Build Issues #8480

@yahyadogan

Description

@yahyadogan

Description: We are encountering two issues related to Firebase Cloud Messaging (FCM) on iOS. First, push notifications are not being received on iOS devices, despite proper configuration. Second, the build process is failing, preventing us from properly testing and deploying the app on iOS.

Steps to Reproduce:

Integrated FCM with React Native using @react-native-firebase/app and @react-native-firebase/messaging packages.

Followed the setup guide for FCM, including configuring Firebase, downloading the GoogleService-Info.plist, and adding it to the project.

Enabled Push Notifications and Background Modes in Xcode, as well as Remote Notifications under "Signing & Capabilities".

Tested the app on a real iOS device, as notifications don't work on simulators.

Build Issue:

The build is failing during the iOS build process.

The error message is: xcodebuild exited with error code '65'.

We also face errors related to modulemap not found, Redefinition of module 'ReactCommon', and React module issues during the build.

What We Have Tried:

Verified that the GoogleService-Info.plist is correctly placed and included in the project.

Ensured push notifications are properly requested using messaging().requestPermission().

Tested with actual devices (TestFlight) and confirmed bundle ID matches the one in Firebase.

Checked the notification payload, ensuring it's structured correctly.

Tried cleaning and rebuilding the Xcode project.

Updated dependencies for @react-native-firebase/app and @react-native-firebase/messaging.

Expected Behavior: Push notifications should be received on iOS devices when sent from Firebase, and the app should build successfully.

Actual Behavior:

Push notifications are not being received on iOS devices, despite proper configuration.

The build process fails with multiple errors related to module issues.

Additional Information:

The issue persists even after following the official documentation.

Notifications work fine on Android devices, suggesting the issue is specific to iOS.

The build process fails due to module conflicts and missing modulemap files.

Environment:

React Native version: 0.77.0

@react-native-firebase/app version: 21.14.0

@react-native-firebase/messaging version: 21.14.0

Xcode version: 16.3

iOS version: 18.4

Logs:

Error logs during the build process show the following:

xcodebuild exited with error code '65'
modulemap not found
Redefinition of module 'ReactCommon'
No such module 'React'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions