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

use_frameworks does not work with RCT_NEW_ARCH_ENABLED=1 when running yarn ios #34123

Closed
wood1986 opened this issue Jul 3, 2022 · 10 comments
Closed
Labels
Platform: iOS iOS applications. Resolution: Answered When the issue is resolved with a simple answer Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@wood1986
Copy link
Contributor

wood1986 commented Jul 3, 2022

Description

As 0.69.1 claims use_frameworks is fixed. So I have use_frameworks! in my podfile and I commented out use_flipper!(). Then I run RCT_NEW_ARCH_ENABLED=1 bundle exec pod install. The installation was successful but the build was failed. Here are the messages

❌  error: Multiple commands produce '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h'



❌  error: Multiple commands produce '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/flags.h'



❌  error: Multiple commands produce '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h'



❌  error: Multiple commands produce '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/propsConversions.h'


    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/attributedstring/conversions.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/components/image/conversions.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/components/scrollview/conversions.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/components/text/conversions.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/conversions.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/components/view/conversions.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/conversions.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/core/conversions.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/flags.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/flags.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/debug/flags.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/attributedstring/primitives.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/components/scrollview/primitives.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/primitives.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/components/view/primitives.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/imagemanager/primitives.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/primitives.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/primitives.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/uimanager/primitives.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/propsConversions.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/propsConversions.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/components/view/propsConversions.h (in target 'React-Fabric' from project 'Pods')
    duplicate output file '/Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/propsConversions.h' on task: CpHeader /Users/wood/Library/Developer/Xcode/DerivedData/RN0691-fipjrrbexdsdcqcclssbfifhwnjr/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/propsConversions.h /Users/wood/Desktop/RN0691/node_modules/react-native/ReactCommon/react/renderer/core/propsConversions.h (in target 'React-Fabric' from project 'Pods')

Version

0.69.1

Output of npx react-native info

System:
    OS: macOS 12.4
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 500.25 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.15.1 - /var/folders/kz/jgxnjgvj6g78q_lsy3221ng00000gn/T/yarn--1656884929686-0.9325601541086339/node
    Yarn: 1.22.19 - /var/folders/kz/jgxnjgvj6g78q_lsy3221ng00000gn/T/yarn--1656884929686-0.9325601541086339/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
    Watchman: 2022.06.06.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/wood/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8609683
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.15 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.0.0 => 18.0.0 
    react-native: 0.69.1 => 0.69.1 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  1. npx react-native init RN0691 --template react-native-template-typescript
  2. add use_frameworks! in the ios/Podfile
  3. comment out use_flipper!()
  4. run RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
  5. yarn ios

Snack, code example, screenshot, or link to a repository

N/A

@wood1986 wood1986 changed the title use_frameworks does work with RCT_NEW_ARCH_ENABLED=1 when running yarn ios use_frameworks does not work with RCT_NEW_ARCH_ENABLED=1 when running yarn ios Jul 3, 2022
@react-native-bot react-native-bot added the Platform: iOS iOS applications. label Jul 3, 2022
@ptreitler
Copy link

ptreitler commented Jul 5, 2022

I'm facing the exact same issue. Adapting this workaround for my Podfile helped: https://stackoverflow.com/a/66689361/1746379

Note: I don't have fabric enabled.

post_install do |installer|
  # ...

  installer.pods_project.targets.each do |target|
    if target.name == "React-Fabric"
      target.remove_from_project
  end
end

@cortinico cortinico added Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) Resolution: Answered When the issue is resolved with a simple answer and removed Needs: Triage 🔍 labels Jul 5, 2022
@cortinico
Copy link
Contributor

As 0.69.1 claims use_frameworks is fixed

That doesn't apply to the New Architecture. Support for use_frameworks with the New Architecture (Fabric & TurboModule) is still not avaialble due to how our headers are structured. Closing as this is "expected", we're aware of it and hopefully we'll have more to share in the future.

@wood1986
Copy link
Contributor Author

wood1986 commented Jul 5, 2022

@cortinico I understand it does not apply to New Architecture. But will/should it support in the future?

@cortinico
Copy link
Contributor

But will/should it support in the future?

Yes, it's something we would like to support in the future but we don't have an ETA at the moment

@sushant115
Copy link

@cortinico Could you please tell, Is this fixed in 0.70.6? getting same error in 0.70.6

Output of npx react-native info
System:
OS: macOS 13.0.1
CPU: (8) x64 Apple M1 Pro
Memory: 15.68 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 19.2.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.19.3 - /usr/local/bin/npm
Watchman: 2022.11.28.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 14.1/14B47b - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: ^0.70.6 => 0.70.6
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

@bglgwyng
Copy link

Is this commit going to fix this issue?

@beeboopx
Copy link

beeboopx commented Apr 7, 2023

arrived here from https://github.com/invertase/react-native-firebase which is a pretty popular library that's also requiring use_frameworks! and so not compatible with the new RN architecture atm.

@MasonTyTran
Copy link

Is this commit going to fix this issue?

seems correct haha

@ucheNkadiCode
Copy link

@cortinico is it possible to reopen this issue if you believe it is going to be prioritized in the near future? This is a blocker for all people that use react-native-firebase, one of the more popular packages in react-native. It's also a blocker for folks that use use_frameworks! in general, which I imagine is plenty of other packages.

Do you think it will be available in React Native 72? Thank you!

@cortinico
Copy link
Contributor

Do you think it will be available in React Native 72? Thank you!

Yes this will be available in 0.72. More on this here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS iOS applications. Resolution: Answered When the issue is resolved with a simple answer Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

9 participants