-
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
Can't make an iOS build [0.65.0] #32046
Comments
Have you try to delete the |
Yes, of course |
In your pod file you have duplicate |
You should never delete Podfile.lock. |
@smartameer have slightly updated Podfile due to your comment and deployment_target I receive
require_relative '../node_modules/react-native/scripts/react_native_pods'
|
just the same build error after I upgrade RN from 0.64.0 to 0.65.0, changing deployment target of RCT-Folly does not work, only show this error
|
Same error with fresh 0.65 version and xcode 12.5, RCT-FOLLY problem as mentionned before, impossible to build for release |
Changing iPHONEOS_DEPLOYMENT_TARGET is an anti-pattern at this point. |
@realtril @YaoHuiJi @john-dufrene-dev fix for me was as described here: facebook/flipper#834 (comment) Basically you need to make sure that the deployment target for |
@mikehardy I think we started changing |
@daveslutzkin thanks for your answer, could you explain how to change that, I'm new with react native, thanks in advance |
should i do something like that? @mikehardy @daveslutzkin
|
The warnings are still there, they are not bogus, but neither are they important. Build working >> noise 🤷 |
My take on it now is: if it's possible that some libraries have version dependent behavior, and I was just trying to quiet noise but they actually depend on their build settings not changing, do I really know more than all the library authors? I do not. I should probably leave their build settings alone. |
This is my change as mentionned on previous comment :
With debug mode it's working, but when trying to build for release I have this error, if someone have an idea how to resolve that, I'm on a clean react-native project with xcode 12.5 |
If your Podfile has a section that says something like this:
Then either:
Or make it:
|
thanks, but no luck for me too, everything works well in debug mode, but not release mode, I changed the Podfile but got another error as @john-dufrene-dev mentioned above I have checked the IPHONEOS_DEPLOYMENT_TARGET of "RCT_Folly" in xcode, it's 9.0. also I have a warning when I run "pod install" |
If you just do Don't worry about the cocoapods warning about adding FBReactNativeSpec, that's normal. That's cocoapods warning you that a script was added, in case you have security concerns with the script. In this case, it's a necessary part of react-native iOS compiling, so it's good to be aware (thanks Cocoapods!) but it's not a problem. |
I always disabled flipper because has a lot of issues when you create a new project mostly version cocoa pods etc etc it is a good idea? |
I think it used to be. I did the same. Now it appears that chunks of it are integral to the react-native build for iOS. I no longer think it can easily be avoided. |
@realtril this helped me, and not to say but delete Pods, Podfile.lock before installing again
|
In my case, the issue still exists even though removing flipper |
Parts of flipper are still included now no matter what in react-native 0.65 especially if you want hermes on ios. Here's my full set of hacks. post_install do |installer|
react_native_post_install(installer)
# Apple Silicon builds require a library path tweak for Swift library discovery or "symbol not found" for swift things
installer.aggregate_targets.each do |aggregate_target|
aggregate_target.user_project.native_targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['LIBRARY_SEARCH_PATHS'] = ['$(SDKROOT)/usr/lib/swift', '$(inherited)']
end
end
aggregate_target.user_project.save
end
# Flipper requires a crude patch to bump up iOS deployment target, or "error: thread-local storage is not supported for the current target"
# I'm not aware of any other way to fix this one other than bumping iOS deployment target to match react-native (iOS 11 now)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
# ...but if you bump iOS deployment target, Flipper barfs again "Time.h:52:17: error: typedef redefinition with different types"
# We need to make one crude patch to RCT-Folly - set `__IPHONE_10_0` to our iOS target + 1
# https://github.com/facebook/flipper/issues/834 - 84 comments and still going...
`sed -i -e $'s/__IPHONE_10_0/__IPHONE_12_0/' Pods/RCT-Folly/folly/portability/Time.h`
end |
This is what I had to do to get it all to work with Xcode 13, React Native 0.65.0 Also did a upgrade from 0.61.2 post_install do |installer|
react_native_post_install(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
case target.name
when 'RCT-Folly'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
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
end |
I tried 0.66 today, now everything works even with default Podfile, you do not need those changes mentioned in this issue and you can enable Flipper too. a big thanks to all developers💗 |
@fkgozali this is closable |
closing since we have addressed this in the latest release |
hi @YaoHuiJi ! since you have already successfully updated to 0.66, could you please show what you have in a Podfile? |
@realtril here is my Podfile, I replaced the target name to 'xxx', no other changes. I use realm-js, so I have to disable hermes.
|
@YaoHuiJi thank you! |
@YaoHuiJi please also show what you in build.gradle and app/build.gradle |
Sorry, I'm just working on the iOS version right now |
Description
This is what i have in my
Podfile
React Native version:
Steps To Reproduce
pod update/pod install/pod install --repo-update
##Problem that i am facing
Expected Results
App should build without any issues.
The text was updated successfully, but these errors were encountered: