-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
0.64 stable new template fails when using use_frameworks! #31149
Comments
I also noticed after researching the react code that the ruby pod file (react_native_pods.rb) has an environment var "DISABLE_CODEGEN='1'" which disables this build phase generation all together. so to put it simply: You will notice that the build phase Generate Specs will be gone. I can't imagine anyone using that build step as of now as I am thinking its only used for the new architecture of react native... this makes me wonder why its not disabled by default. Sadly I couldnt modify the :execution_position => :before_compile to before_header as that doesn't exists. |
I had issues also with clean installation and without use_frameworks!, iOS didn't built. Don't know if related, but my issue was related to thing that I started ios build with yarn. It's related somehow to the fact that this Generate Specs is npm script and won't execute correctly if you run with yarn. After I tried just |
Having the same issue here with an existing project and with a fresh template. |
It's a bit of a hack, but it will fix the issue while waiting for an official fix from RN, add this to your # need to move 'Generate Specs' build_phase to be first for FBReactNativeSpec
post_install do |installer|
installer.pods_project.targets.each do |target|
if (target.name&.eql?('FBReactNativeSpec'))
target.build_phases.each do |build_phase|
if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
target.build_phases.move(build_phase, 0)
end
end
end
end |
@marcelkalveram Thanks you, the fix works! |
indeed - combo of use_frameworks and react-native 0.64.0 needs @martintreurnicht fix above, I cross-linked a commit implementing it in a repo I maintain to demonstrate successful builds for the react-native-firebase repo You can use that script as a reproducible example if you like - the sed line included (which slices in Martin's fix) can be toggled on or off to reproduce the failure, but the repo starts from scratch with a clean react-native template so hopefully it's useful. |
Just a note for everyone that this is still an unresolved issue for iOS users with static_frameworks as far as I know? Unsure on status for 0.65 but I imagine it is not resolved there as I see no related PR linked or commit reference I'm still using the Podfile hack above successfully when instructing others how to build |
what is the status of this one? |
This is related to react-native 0.64 which is so long ago that in the meantime building for macCatalyst broke complete, then was fixed, and then was fixed for use_frameworks ;-). I don't anticipate any motion on this one. I'm focused on react-native 0.70 cherry-picks, happy to see the CI matrix expanded to check use_frameworks to prevent regression in future (https://github.com/facebook/react-native/pulls?q=is%3Apr+matrix+sort%3Aupdated-desc ) and examining the 0.71 release when it comes out. |
Irony (?), I just realized this is still live in my make-demo.sh script and just copy-pasted it in to my Podfile, but I'm not sure if it's strictly required or not. It was actually building correctly without it (react-native 0.69.5 + react-native-firebase@current), but I fear taking it out at the moment as I'm struggling with enough things that this one - which at worst should do no harm - seems okay to keep for a bit until I can test taking it out more thoroughly Maybe others on this issue have more concrete info / experience |
Just chipping in, I used your |
Thanks, happy to hear a success report on current stable, I'll remove this baggage from my script and see how it goes |
Closing as all the use_frameworks! issues have been resolved in the latest stable of RN |
Getting an error when I take the default template using "npx react-native init" and then changing Podfile to use "use_frameworks!". (removed flipper)
Cycle inside FBReactNativeSpec; building could produce unreliable results. This usually can be resolved by moving the shell script phase '[CP-User] Generate Specs' so that it runs before the build phase that depends on its outputs.
Cycle details:
→ Target 'FBReactNativeSpec' has link command with output '/Users/robertalmalak/Library/Developer/Xcode/DerivedData/testreact-derxgqraechlsxbpbivbctupykqo/Build/Products/Debug-iphonesimulator/FBReactNativeSpec/FBReactNativeSpec.framework/FBReactNativeSpec'
○ Target 'FBReactNativeSpec' has compile command with input '/Users/robertalmalak/testreact/testreact/ios/Pods/Target Support Files/FBReactNativeSpec/FBReactNativeSpec-dummy.m'
○ That command depends on command in Target 'FBReactNativeSpec': script phase “[CP-User] Generate Specs”
○ Target 'FBReactNativeSpec' has copy command from '/Users/robertalmalak/testreact/testreact/node_modules/react-native/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h' to '/Users/robertalmalak/Library/Developer/Xcode/DerivedData/testreact-derxgqraechlsxbpbivbctupykqo/Build/Products/Debug-iphonesimulator/FBReactNativeSpec/FBReactNativeSpec.framework/Headers/FBReactNativeSpec.h'
○ That command depends on command in Target 'FBReactNativeSpec': script phase “[CP-User] Generate Specs”
The text was updated successfully, but these errors were encountered: