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

[🐛] 🔥 [iOS][Expo/SDK44] Generated RNFBApp/RNFBVersion.m uses old style react header imports #5965

Closed
2 of 7 tasks
fobos531 opened this issue Dec 27, 2021 · 1 comment · Fixed by #6126
Closed
2 of 7 tasks
Labels
impact: build-error Behaviour causing build failure platform: expo platform: ios plugin: app-core Firebase Apps / Core internals. type: bug New bug report

Comments

@fobos531
Copy link

Issue

This issue is very similar in nature to this PR: #5947

Since upgrade to Expo SDK 44 which enforces the usage of #import <React/*.h> header import style, I've found that the RNFBVersion.m that is generated in the RNFBApp Cocoapod as part of the build process uses the old style import, as seen in the screenshot
CleanShot 2021-12-27 at 22 40 33

Changing the import to #import <React/RCTVersion.h> manually resolves the build issue for me, but I reckon this has to be configured elsewhere

More information: expo/expo#15622 (comment)


Project Files

Javascript

Click To Expand

package.json:

"@react-native-firebase/app": "^14.1.0",
"@react-native-firebase/messaging": "^14.1.0",

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")


platform :ios, '12.0'

target 'MyProject' do
  use_expo_modules!
  config = use_native_modules!

  # react-native-permissions
  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'Permission-Motion', :path => "#{permissions_path}/Motion"


  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => true
  )


  target 'MyProjectTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  # use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1')

  post_install do |installer|
    react_native_post_install(installer)
    # Temporary Workaround build error for classic quoted imports
    # "RCTBridgeModule.h" -> <React/RCTBridgeModule.h>
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        unless ['React-Core', 'React-RCTText'].include? target.name
          config.build_settings["USE_HEADERMAP"] = "NO"
        end
      end
    end
  end
end


Environment

Click To Expand

react-native info output:

System:
    OS: macOS 12.1
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 35.92 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 17.2.0 - /usr/local/bin/node
    Yarn: 3.1.0 - ~/.yarn/bin/yarn
    npm: 8.1.4 - /usr/local/bin/npm
    Watchman: 2021.12.13.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    Android SDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7784292
    Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
  Languages:
    Java: 15.0.2 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1 
    react-native: ^0.64.3 => 0.64.3 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: 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:
    • 14.1.0
  • Firebase module(s) you're using that has the issue:
    • app & messaging
  • Are you using TypeScript?
    • Y - 4.5.2


@fobos531 fobos531 added help: needs-triage Issue needs additional investigation/triaging. type: bug New bug report labels Dec 27, 2021
@mikehardy
Copy link
Collaborator

Sorry for the delay! PR queued, will merge when CI done, will be in next release (typically less than a week)

@mikehardy mikehardy added platform: ios impact: build-error Behaviour causing build failure plugin: app-core Firebase Apps / Core internals. platform: expo and removed help: needs-triage Issue needs additional investigation/triaging. labels Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact: build-error Behaviour causing build failure platform: expo platform: ios plugin: app-core Firebase Apps / Core internals. type: bug New bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants