flipper
flipper copied to clipboard
Getting iOS Build issue
🐛 Bug Report
Getting issue while build project on iOS. This errors by removing Flipper. If Flipper updated in pod file the same issue getting but it shows Flipper-Folly instead of RCT-Folly in folder structure of error. Showing Recent Errors Only /Users/shahululfarisp/Downloads/atlantis-pa-fe/ios/Pods/Headers/Public/RCT-Folly/folly/Utility.h:327:12: No template named 'enable_if_t' in namespace 'std'; did you mean 'enable_if'?
Showing Recent Errors Only /Users/shahululfarisp/Downloads/atlantis-pa-fe/ios/Pods/Headers/Public/RCT-Folly/folly/Optional.h:264:20: Functions that differ only in their return type cannot be overloaded
Showing Recent Errors Only /Users/shahululfarisp/Downloads/atlantis-pa-fe/ios/Pods/Headers/Public/RCT-Folly/folly/Range.h:527:12: No template named 'enable_if_t' in namespace 'std'; did you mean 'enable_if'?
To Reproduce
Just build the project on X code 14.2 or X code 13.4
Environment
react native: 0.63.0
Node: 14.17.3
XCode 14.2 or 13.4

I got the same error when I upgraded from v0.66.4 to 0.69.12 :cry:
Any updates on this? Did anyone solve the issue?
I have the same issue.
Any updates on this issue
Seeing the same issue on React Native 0.72.6. Has there been any resolution here?
+1
+1
+1
This works for me, I added in the Podfile those 3 fixes as post_install.
def __apply_Xcode_15_post_install_workaround(installer)
# This is a workaround for Xcode 15, see: https://github.com/facebook/react-native/issues/37748.
puts "Applying Xcode 15 post install workaround"
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
def __apply_Xcode_15_Flipper_post_install_workaround(installer)
puts "Applying Xcode 15 Flipper fix."
installer.pods_project.targets.each do |target|
if target.name == 'Flipper'
file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h'
contents = File.read(file_path)
unless contents.include?('#include <functional>')
File.open(file_path, 'w') do |file|
file.puts('#include <functional>')
file.puts(contents)
end
end
end
end
end
def __apply_Xcode_15_commonFixes_post_install(installer)
# This is common issues
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
# See https://github.com/facebook/react-native/issues/37748#issuecomment-1580589448
post_install do |installer|
__apply_Xcode_15_post_install_workaround(installer)
__apply_Xcode_15_Flipper_post_install_workaround(installer)
__apply_Xcode_15_commonFixes_post_install(installer)
end
Had a similar issue with RN 0.72.6. Updating to 0.72.12 fixed it.
Had a similar issue with RN
0.72.6. Updating to0.72.12fixed it.
Thank you sir! This upgrade helped me! Currently using below versions on system...
==ENV CHECKER==
=====Ruby======
ruby 3.3.1 (2024-04-23 revision c56cd86388) [arm64-darwin23]
===Cocoapods===
1.15.2
====Bundler====
Bundler version 2.5.9 (2024-05-06 commit unknown)
=====Java======
openjdk 17.0.10 2024-01-16
OpenJDK Runtime Environment Homebrew (build 17.0.10+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.10+0, mixed mode, sharing)
=====Node======
v20.9.0
=====Yarn======
1.22.21
=====XCode=====
Xcode 15.3
Build version 15E204a
=====MacOS=====
ProductName: macOS
ProductVersion: 14.4.1
BuildVersion: 23E224