Closed techamit95ch closed 11 months ago
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
Same here, I need to update my native library because the ios 17 broke her and i get this the same error
https://github.com/facebook/react-native/issues/37748
It's worked for me
If you don't need xcode Version 15.0 you can downgrade to previous version :
Command Line Tools
field (if you don't see the downloaded version try close an reopen Xcode)npx react-native info
=> You should see Xcode: 14.3.1
in the IDEs
sectionyarn react-native run-iOS
This worked for me
Getting a similar RTC-Folly error. Xcode 15 with RN 0.72.5. Xcode says the error is in Folly/Time line 52, see screen. Error was occurring on RN 0.71.7 as well. Upgraded RN in an attempt to troubleshoot the issue.
RCT-Folly/folly/portability/Time.h:52:17
"Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')"
Unlikely that this is an actual fix, but if I comment out line 52, it gets past this issue. (And later fails on the linker seemingly unrelated to this but I could be wrong)
Also encountered this issue and the fix was to add __apply_Xcode_12_5_M1_post_install_workaround(installer)
in the post_install
step of the Podfile
. We had left that out at some point since it didn't seem necessary before, but now it looks like it's required.
Good call. That helped resolve the issue for me. I needed that 12_5 fix and the 14_3.
Here's what I added to my pod file:
-before your project and target-
def __apply_Xcode_14_3_RC_post_install_workaround(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
current_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
minimum_target = min_ios_version_supported
if current_target.to_f < minimum_target.to_f
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = minimum_target
end
end
end
end
-here's what the post installer looks like-
post_install do |installer|
react_native_post_install(installer, config[:reactNativePath],
:mac_catalyst_enabled => false)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
__apply_Xcode_14_3_RC_post_install_workaround(installer)
end
I Just run the project at xcode, crashed and after that xcode suggested me to fix a line at file hash.hpp.
This is what a changed!
`
template <typename T>
struct hash_base : std::__unary_function<T, std::size_t> {};
`
This is the code what crashed before
`
template <typename T>
struct hash_base : std::unary_function<T, std::size_t> {};
`
I was able to get rid of the folly build errors by rearranging my build phases, specifically moving our copepods phases up in the order
If you don't need xcode Version 15.0 you can downgrade to previous version :
- Go to https://developer.apple.com/download/all/ and download previous Xcode version (14.3.1 at the moment).
- Unzip it
- Open Xcode > Settings > Locations, and select the downloaded version in
Command Line Tools
field (if you don't see the downloaded version try close an reopen Xcode)- Optionally check the output of
npx react-native info
=> You should seeXcode: 14.3.1
in theIDEs
section- Exit the settings and now try again to launch
yarn react-native run-iOS
This worked for me
this worked for me. Thanks
If you don't need xcode Version 15.0 you can downgrade to previous version :
Go to https://developer.apple.com/download/all/ and download previous Xcode version (14.3.1 at the moment). Unzip it Open Xcode > Settings > Locations, and select the downloaded version in Command Line Tools field (if you don't see the downloaded version try close an reopen Xcode) Optionally check the output of npx react-native info => You should see Xcode: 14.3.1 in the IDEs section Exit the settings and now try again to launch yarn react-native run-iOS This worked for me
this worked for me. Thanks
Where do you unzip the old Xcode v14.3.1? I've tried the Applications folder, downloads, etc. Tried restarting (both full pc restart and Xcode restart) and it doesn't appear within the dropdown of the "Command Line Tools" field.
Thanks!
Unzip Xcode in applications. But you also need to download the command line tools for 14.3.1, which you can get from the Apple Developer site where you get Xcode 14.3.1. Once you download the 14.3.1 cl tools and install them, they will appear as an option in the drop down.
Ah, gotcha. Thanks! I think my issue is that I'm on MacOS Sonoma. Also can't install cl tools v14. Anyone find a workaround?
Hi there! Please:
react_native_post_install
hook in your Podfile's post_install_hook
. Like this__apply_Xcode_12_5_M1_post_install_workaround
as shown above.We released a new version of React Native this week that should address all these problems:
@techamit95ch Based on https://github.com/facebook/react-native/issues/37748 I've created this def in my podfile:
def __xcode_15_workaround(installer)
xcode_version_output = `xcodebuild -version`
xcode_version_match = xcode_version_output.match(/Xcode (\d+(\.\d+)?)/)
if xcode_version_match
xcode_version = Gem::Version.new(xcode_version_match[1])
if xcode_version >= Gem::Version.new('15.0')
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
end
end
end
end
end
You can use it in the post_install script like this:
post_install do |installer|
#.... other configs
# Call the Xcode 15 workaround function
__xcode_15_workaround(installer)
#.... other configs
end
I have faced the same issue after upgrading XCode and Expo to Following
Expo: ^50.0.7
React-Native: 0.73.4
Xcode: 15.2
Problem: I was using jsc
engine instead of Hermes
.
Solution: Converting the JS Engine to Hermes
in podfile resolved this problem.
Hi there! Please:
- make sure that you are calling the
react_native_post_install
hook in your Podfile'spost_install_hook
. Like this- Please invoke the
__apply_Xcode_12_5_M1_post_install_workaround
as shown above.- update to React Native 0.72.6.
We released a new version of React Native this week that should address all these problems:
- unary_function: addressed by these lines
- clockid_t: addressed by these lines
still getting the same issue with all beforementioned invocations on latest x-code with RN 0.72.6
What did it for me was to build with xcode, and after that i got an error concerning react codegen, i updated the development target for that on xcode, and subsequent builds from the terminal were successful.
After 2 days of research and trying different approaches I ended up with a solution: What I did:
but nothing worked 😪
The solution that worked for me:
I was working to setup Xcode cloud, since ios is stating to use xcode 15 or later to build ios apps. my react native version : "0.71.7". i tried xcode 15.4 and 15.2 but for both of them build failed. which version of later xcode 15 would be helpful for this version of react native, or should definitely update react-native version?
@tanjilMDS any insights please
@chaitanya71998 I think you can try downgrading XCode to 15.1 as well. But 15.2 should do the work. Try in a new project as well to check if it builds successfully or not from xcode
Xcode 14 doesn't allow to submit the app to app store, similarly Xcode 15 is throwing RCT error, I think it's regarding this libraries
Xcode 15.3 is bugged. They reimplemented the linker and it does not support weak symbols. The error presents itself when building an app using Dynamic Frameworks.
Apple must fix the issue, there is very little we can do here. Please downgrade to Xcode 15.2. That should do the trick.
I am using Xcode 15.2 still facing RCTPolly issue
Xcode 15.3 is bugged. They reimplemented the linker and it does not support weak symbols. The error presents itself when building an app using Dynamic Frameworks.
Apple must fix the issue, there is very little we can do here. Please downgrade to Xcode 15.2. That should do the trick.
Xcode 15.3 is bugged. They reimplemented the linker and it does not support weak symbols. The error presents itself when building an app using Dynamic Frameworks.
Apple must fix the issue, there is very little we can do here. Please downgrade to Xcode 15.2. That should do the trick.
I am also having same issue i am using x code 15.2 and react native 0.71.8
Can you create a reproducer using this template
Anyone find a solution? Same problem here
For me, this issue occurred when I updated Xcode from version 14 to 15. After days of debugging, I discovered that the problem was due to Expo. First, I removed all packages and references related to Expo from the iOS folder. After doing this, the project was built successfully.
Then, I progressively added the updated Expo and its related packages back into the project.
Description
The following build commands failed: CompileC-duhrncqankvmlvaqzannliomyfdw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/json.o /ios/Pods/RCT-Folly/folly/json.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
(1 failure)
React Native Version
0.72.4
Output of
npx react-native info
System: OS: macOS 13.5.2 CPU: (8) arm64 Apple M1 Pro Memory: 105.25 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 18.17.1 path: /opt/homebrew/bin/node Yarn: version: 3.6.3 path: ~/node_modules/.bin/yarn npm: version: 9.6.7 path: /opt/homebrew/bin/npm Watchman: version: 2023.08.14.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.12.1 path: /opt/homebrew/opt/ruby/bin/pod SDKs: iOS SDK: Platforms:
Steps to reproduce
yarn react-native run-iOS
Snack, screenshot, or link to a repository
it's confidential