Skip to content

Firebase integration still leaks into generated App Clip target #89

@okansahin

Description

@okansahin

Summary

We ran into a second issue while integrating react-native-app-clip in an Expo app that also uses React Native Firebase.

Even when Firebase packages are excluded from the App Clip target, Firebase-specific Xcode integration still leaks into the generated App Clip target.

In our case this showed up in two places:

  1. Firebase build phases were still attached to the App Clip target
  2. Firebase bootstrap code was still present in the generated App Clip AppDelegate.swift

What we observed

Our App Clip target is intended to be Firebase-free.

We excluded Firebase packages such as:

  • @react-native-firebase/app
  • @react-native-firebase/crashlytics
  • @react-native-firebase/auth
  • @react-native-firebase/firestore
  • @react-native-firebase/remote-config
  • @react-native-firebase/storage

However, after expo prebuild -p ios, the generated App Clip target still ended up with Firebase-related integration.

Specifically, the App Clip target initially contained build phases like:

  • [CP-User] [RNFB] Core Configuration
  • [CP-User] [RNFB] Crashlytics Configuration

And the generated App Clip AppDelegate.swift still contained:

import FirebaseCore
FirebaseApp.configure()

This caused build-time failures such as missing GOOGLE_APP_ID, and in general meant the App Clip target was not actually isolated from Firebase.

Why this seems separate from excludedPackages wiring

I opened a separate PR for excludedPackages not being passed through to cliPlugin.js:

That issue explains why community/native dependencies can still be autolinked into the App Clip target.

But this Firebase issue appears to be different:

  • the App Clip target itself is being generated from a main app target that has already been modified by other Expo config plugins
  • so Firebase-specific target configuration and bootstrap code can still leak into the generated App Clip target even when Firebase packages are intended to be excluded from that target

Question

How would you prefer this to be handled upstream?

Options I can imagine:

  1. react-native-app-clip detects excluded Firebase packages and strips known Firebase build phases / bootstrap from the generated App Clip target
  2. App Clip target generation should happen earlier / differently so plugin-modified main target files are not copied with Firebase-specific code
  3. This is better handled outside this library, and the recommended solution should live in docs

I’m happy to help with a follow-up PR, but I wanted to ask first because this seems more like a cross-plugin / second-target integration problem than a single isolated Podfile wiring bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions