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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃敟[馃悰] iOS - build error: Library not found for -lFirebaseInstallations #7675

Open
2 of 10 tasks
aknad opened this issue Mar 8, 2024 · 3 comments
Open
2 of 10 tasks
Labels
Workflow: Waiting for User Response Blocked waiting for user response.

Comments

@aknad
Copy link

aknad commented Mar 8, 2024

Issue

I'm trying to update RNFB from 14.12 to 19.0.1 and Firebase pods from 8.15.0 to 10.22.0
XCode fails to build with an error on my Notification Service target

Screenshot 2024-03-08 at 19 37 12

I don't understand if it's related to the 'use_frameworks' directive or there's something else
do you have any idea?


Project Files

Javascript

Click To Expand

package.json:

# N/A

firebase.json for react-native-firebase v6:

# N/A

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, min_ios_version_supported
prepare_react_native_project!

source 'https://github.com/CocoaPods/Specs.git'

use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true

target 'MyApp' do
  config = use_native_modules!
  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # Hermes is now enabled by default. Disable by setting this flag to false.
    # Upcoming versions of React Native may rely on get_default_flags(), but
    # we make it explicit here to aid in the React Native upgrade process.
    :hermes_enabled => false, #flags[:hermes_enabled],
    :fabric_enabled => false, #flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  pod 'Google-Mobile-Ads-SDK', '9.14.0'

  permissions_path = '../node_modules/react-native-permissions/ios'

  # pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral.podspec"
  pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
  pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways.podspec"
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse.podspec"
  # pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary.podspec"
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications.podspec"
  pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary.podspec"
  pod 'Permission-AppTrackingTransparency', :path => "#{permissions_path}/AppTrackingTransparency.podspec"
  
  post_install do |installer|
    react_native_post_install(
      installer,
      # Set `mac_catalyst_enabled` to `true` in order to apply patches
      # necessary for Mac Catalyst builds
      :mac_catalyst_enabled => false
    )
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
    # flipper_post_install(installer)
    installer.pods_project.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
    end
  end

end

target 'NotificationService' do
  pod 'Firebase/Messaging', '10.22.0'
end
# N/A

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

 System:
    OS: macOS 13.6
    CPU: (8) arm64 Apple M1
    Memory: 71.56 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm
    Watchman: 2023.11.20.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.14.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9123335
    Xcode: 15.2/15C500b - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.16.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.14 => 0.71.14
    react-native-macos: Not Found
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • 19.0.1
  • Firebase module(s) you're using that has the issue:
    • FirebaseInstallations (10.22.0)
    • FirebaseMessaging (10.22.0)
  • Are you using TypeScript?
    • Y & 4.8.4


@aknad aknad added Help: Needs Triage Issue needs additional investigation/triaging. Impact: Bug New bug report labels Mar 8, 2024
@mikehardy
Copy link
Collaborator

馃 have you tried including the pod Firebase/Installations in your other target as well?
I would remove the version specifier if possible, react-native-firebase/app should control those if possible - I believe if you do not specify a pod version then the ones from react-native-firebase/app will take precedence and keep everything in line (and more importantly - keep things updated and compatible as the versions slowly move forward...)

@mikehardy mikehardy added Workflow: Waiting for User Response Blocked waiting for user response. and removed Impact: Bug New bug report Help: Needs Triage Issue needs additional investigation/triaging. labels Mar 25, 2024
@aknad
Copy link
Author

aknad commented Apr 12, 2024

sorry for the delay, I was on another branch

Anyway, adding Firebase Installation and removing the version doesn't fix

target 'NotificationService' do pod 'Firebase/Installations' pod 'Firebase/Messaging' end

@mikehardy
Copy link
Collaborator

Sorry, that was my best guess on very little information
The issue in general falls under "Resolution: No Template" since you've removed much of the info or not provided it
And then secondarily https://stackoverflow.com/help/minimal-reproducible-example

I have this in contrast, and it works https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh

If you take that demo and add a new target to it, it likely will still work, or at least can serve as a minimal reproducible example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Workflow: Waiting for User Response Blocked waiting for user response.
Projects
None yet
Development

No branches or pull requests

2 participants