Skip to content

fix(spm): Include FirebaseRemoteConfigInternal in RemoteConfig product#16291

Open
ArthurHPorto wants to merge 1 commit into
firebase:mainfrom
ArthurHPorto:fix/remote-config-internal-product
Open

fix(spm): Include FirebaseRemoteConfigInternal in RemoteConfig product#16291
ArthurHPorto wants to merge 1 commit into
firebase:mainfrom
ArthurHPorto:fix/remote-config-internal-product

Conversation

@ArthurHPorto

Copy link
Copy Markdown

Discussion

  • Read the contribution guidelines (CONTRIBUTING.md).
  • This PR addresses a SwiftPM packaging issue that breaks consumers building with Swift explicit modules enabled (default in Xcode 26+), particularly when using project generators such as Tuist.

Problem

FirebaseRemoteConfig is split across two SwiftPM targets because SwiftPM does not support mixed-language targets:

Target Role
FirebaseRemoteConfigInternal Objective-C implementation
FirebaseRemoteConfig Swift API (@_exported import FirebaseRemoteConfigInternal)

The public FirebaseRemoteConfig library product previously listed only the Swift target. When explicit modules are enabled, consumers fail to resolve the internal clang module (FirebaseRemoteConfigInternal), producing errors such as:

Unable to find module dependency: 'FirebaseRemoteConfigInternal'

This forces workarounds like disabling SWIFT_ENABLE_EXPLICIT_MODULES or manually declaring the internal clang module in Tuist's importedClangModules.

Solution

Include FirebaseRemoteConfigInternal in the FirebaseRemoteConfig library product:

.library(
  name: "FirebaseRemoteConfig",
  targets: ["FirebaseRemoteConfig", "FirebaseRemoteConfigInternal"]
),

This mirrors the existing pattern used by the FirebaseAI product, which bundles multiple targets in a single library product.

Why this is the best option now

  • Minimal change: one-line Package.swift update with no public API changes.
  • No new public surface: unlike exposing FirebaseRemoteConfigInternal as a standalone product, this does not encourage direct dependency on an internal module.
  • Fixes the root cause for SPM consumers: the internal clang module is built and linked as part of the FirebaseRemoteConfig product dependency graph.
  • CocoaPods unaffected: CocoaPods already ships Remote Config as a single mixed-language pod with an umbrella header.
  • Definitive long-term fix deferred: merging ObjC + Swift into one target (as CocoaPods does) depends on broader SwiftPM mixed-language support (SE-0403).

Testing

  • Verified locally that a Tuist + SPM consumer can build with explicit modules enabled after this change.
  • Existing repository tests (CI).

No new unit tests were added because this is a SwiftPM product packaging change with no runtime or API behavior changes.

API Changes

  • No public API changes.

Changelog

  • Updated FirebaseCore/CHANGELOG.md under Firebase 12.15.0.

Made with Cursor

Bundle the internal Objective-C target with the FirebaseRemoteConfig
SwiftPM library product so consumers can resolve the clang module when
building with Swift explicit modules enabled (e.g. Xcode 26+ and Tuist).
@ArthurHPorto ArthurHPorto requested a review from a team as a code owner June 17, 2026 02:27
@gemini-code-assist

Copy link
Copy Markdown
Contributor
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@google-cla

google-cla Bot commented Jun 17, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@ArthurHPorto

Copy link
Copy Markdown
Author

I signed the CLA.

@ArthurHPorto ArthurHPorto force-pushed the fix/remote-config-internal-product branch from 75ef3ce to d2b1f58 Compare June 17, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant