Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firebase_core: Failed to Build iOS App - Firebase Module Redefinition #16927

Open
1 task done
RahmiTufanoglu opened this issue Dec 31, 2024 · 2 comments
Open
1 task done
Labels
Needs Attention This issue needs maintainer attention. platform: ios Issues / PRs which are specifically for iOS. plugin: core type: bug Something isn't working

Comments

@RahmiTufanoglu
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Core

Which platforms are affected?

iOS

Description

Description
When attempting to build the iOS app, the build process fails with errors related to a redefinition of the Firebase module and issues emitting a precompiled header for the bridging header file. This prevents the app from being built and launched on the simulator.

Environment

  • Xcode Version: 16.2
  • macOS Version: Sonoma 14.5
  • Flutter Version: 3.27.1
  • Firebase SDK Version: 3.9.0
  • iOS Deployment Target: 18.0

Expected Behavior
The app should build successfully without errors and launch on the simulator.

Observed Behavior
The following errors occur during the build process:

Error (Xcode): redefinition of module 'Firebase'
/Users/xxx/code/foo/my_app/ios/Pods/Firebase/CoreOnly/Sources/module.modulemap:0:7

Error (Xcode): failed to emit precompiled header '/Users/xxx/Library/Developer/Xcode/DerivedData/Runner-elopyndyahddlwghimmamhrolobf/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift_25AUGCNBX54WL-clang_3C7LSRA2V4KFR.pch' for bridging header '/Users/rahmitufanoglu/code/studylife/studylife_app/ios/Runner/Runner-Bridging-Header.h'

Additional Context

  • The issue seems to be related to the integration of Firebase and possibly duplicate definitions or module conflicts.
  • The error with the precompiled header could indicate issues with the bridging header file or project settings.

Workarounds Tried

  1. Cleaned the build folder (Cmd Shift K in Xcode).
  2. Deleted the DerivedData folder and rebuilt.
  3. Reinstalled CocoaPods dependencies with pod deintegrate && pod install.
  4. Verified the Runner-Bridging-Header.h file for correctness.
  5. Ensured all Firebase dependencies are up-to-date.

Request for Help

  • Guidance on resolving the Firebase module redefinition error.
  • Steps to troubleshoot the precompiled header issue.
  • Any necessary updates or changes to the project's Podfile, bridging header, or other configurations.

Attachments

  • Podfile
  • Relevant parts of Runner-Bridging-Header.h
  • Screenshot or logs (if applicable).

Feel free to customize further with your specific environment details or any additional troubleshooting steps you’ve tried!

Reproducing the issue

Create a new Flutter project (v. 3.27.1) and integrate firebase_core 3.9.0

Firebase Core version

3.9.0

Flutter Version

3.27.1

Relevant Log Output

Flutter dependencies

Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments

No response

@RahmiTufanoglu RahmiTufanoglu added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Dec 31, 2024
@SelaseKay SelaseKay added plugin: core platform: ios Issues / PRs which are specifically for iOS. labels Dec 31, 2024
@SelaseKay
Copy link
Contributor

Hi @RahmiTufanoglu, I’m unable to reproduce this issue on my end. Could you try the potential solutions mentioned in this similar issue to see if they resolve it for you?

@SelaseKay SelaseKay added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Dec 31, 2024
@RahmiTufanoglu
Copy link
Author

@SelaseKay The solution in the linked issue did not work. I am using the swift package manager.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention This issue needs maintainer attention. platform: ios Issues / PRs which are specifically for iOS. plugin: core type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants