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

react-native update from 0.70.6 to 0.71.0, error with RCT-Folly #232

Open
1 task done
Larens94 opened this issue Nov 9, 2023 · 5 comments
Open
1 task done

react-native update from 0.70.6 to 0.71.0, error with RCT-Folly #232

Larens94 opened this issue Nov 9, 2023 · 5 comments
Labels

Comments

@Larens94
Copy link

Larens94 commented Nov 9, 2023

I upgraded react-native from version 070.6 to 0.71.0. When I do the pod install it gives me this error: '[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod react-native-compressor depends upon RCT-Folly, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.'

I tried adding 'pod 'RCT-Folly', :modular_headers => true' as suggested, but it gave me another error '[!] There are multiple dependencies with different sources for RCT-Folly in Podfile:

  • RCT-Folly
  • RCT-Folly (from ../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec)'

Even if there is no other declaration for RCT-Folly in my Podfile

Platform

  • [] Android
  • iOS

React Native Version 0.71.0

React Native Compressor Version 0.18.15

###This is my Podfile

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false

If you're using autolinking, this line might not be needed

pod 'WatermelonDB', :path => '../node_modules/@nozbe/watermelondb'

NOTE: Do not remove, needed to keep WatermelonDB compiling:

pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi', :modular_headers => true

NOTE: This is required as of v0.23

pod 'simdjson', path: '../node_modules/@nozbe/simdjson'

pod 'RNFS', :path => '../node_modules/react-native-fs'
pod 'react-native-contacts', :path => '../node_modules/react-native-contacts'
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true

pod 'JitsiMeetSDK', :git => 'https://github.com/Larens94/jitsi-meet-ios-sdk-releases', :branch => 'ex-04'

target 'Talk' do
config = use_native_modules!
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone"

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 => true,
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => FlipperConfiguration.enabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)

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

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)

installer.pods_project.targets.each do |target|
  target.build_configurations.each do |config|
    config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
  end
end

end

target 'ShareExtension' do
use_react_native!

pod 'RNShareMenu', :path => '../node_modules/react-native-share-menu'
# Manually link packages here to keep your extension bundle size minimal

end
end

Copy link

github-actions bot commented Nov 9, 2023

👋 @Larens94
Thanks for opening your issue here! If you find this package useful hit the star🌟!

@numandev1
Copy link
Owner

@Larens94 we are already setting use_modular_headers! in our example directory code

use_modular_headers!

can we see it on zoom session?

@numandev1
Copy link
Owner

@Larens94 i confirm that modular_headers is also working on my side, pod 'react-native-compressor', :path => '../node_modules/react-native-compressor', :modular_headers => true

@ArindamRayMukherjee
Copy link

ArindamRayMukherjee commented Jan 30, 2024

Facing the same issue here.
And people have faced this issue many times in the past it seems, without a proper solution for themselves.
#187
#103
#46

(The example project works because it is minimal and uses use_modular_headers! globally , but that does not work for realistic projects that depend on other libs that don't like use_modular_headers)

The following does not work in my case

pod 'react-native-compressor', :path => '../node_modules/react-native-compressor', :modular_headers => true

I still get

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod react-native-compressor depends upon React-Fabric, React-graphics, React-utils, and React->debug, which do not define modules. To opt into those targets generating module maps (which is necessary to import >them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or >specify :modular_headers => true for particular dependencies.

If I use use_modular_headers! I get arbitrary failures at other parts of the build process, like

The following build commands failed:
CompileC /Users/arindamray/Library/Developer/Xcode/DerivedData/DanceAway->hagtrhcdkueyucdwmsznhlrslqjs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React->utils.build/Objects-normal/arm64/ManagedObjectWrapper.o >/Users/arindamray/IdeaProjects/temp/DanceAppCopy/node_modules/react->native/ReactCommon/react/utils/ManagedObjectWrapper.mm normal arm64 objective-c++ >com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-utils' from project 'Pods')
PhaseScriptExecution [CP]\ Copy\ XCFrameworks >/Users/arindamray/Library/Developer/Xcode/DerivedData/DanceAway->hagtrhcdkueyucdwmsznhlrslqjs/Build/Intermediates.noindex/Pods.build/Debug->iphonesimulator/FBSDKCoreKit.build/Script-46EB2E00024390.sh (in target 'FBSDKCoreKit' from project 'Pods')
(2 failures)

Copy link

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants