I am rebuilding my React Native 0.67.4 project by yarn add
module one by one with Xcode 13/cocoapods 1.15. After a few modules added, run pod install
and npx react-native run-ins
to test with IOS 15 emulator. The following error occurs after a few module added and pod install
successfully. I sense that the error is pod related but don’t know how to fix it. Here is the error
/Users/macair/Documents/code/js/xyz_app6/node_modules/react-native/React/CoreModules/RCTActionSheetManager.mm:98:35: error: no member named 'cancelButtonTintColor' in 'JS::NativeActionSheetManager::SpecShowActionSheetWithOptionsOptions'
[RCTConvert UIColor:options.cancelButtonTintColor() ? @(*options.cancelButtonTintColor()) : nil];
~~~~~~~ ^
/Users/macair/Documents/code/js/xyz_app6/node_modules/react-native/React/CoreModules/RCTActionSheetManager.mm:98:72: error: no member named 'cancelButtonTintColor' in 'JS::NativeActionSheetManager::SpecShowActionSheetWithOptionsOptions'
[RCTConvert UIColor:options.cancelButtonTintColor() ? @(*options.cancelButtonTintColor()) : nil];
~~~~~~~ ^
2 errors generated.
......
** BUILD FAILED **
The following build commands failed:
CompileC /Users/macair/Library/Developer/Xcode/DerivedData/xyz_app6-drkombcrczieyyfirepznaljzqwr/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-CoreModules.build/Objects-normal/x86_64/RCTActionSheetManager.o /Users/macair/Documents/code/js/xyz_app6/node_modules/react-native/React/CoreModules/RCTActionSheetManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-CoreModules' from project 'Pods')
(1 failure)
2
Answers
Perform the below steps:
node_modules
foldernpm install
oryarn install
pods
folder andPodfile.lock
filecd ios && pod install
npx react-native run-ios
Hope it works!
I’ve tried cleaning everything but it didn’t work for me. In the end the issue was related to the iOS deployment target of the React-Codegen pod. Changing it to my project’s minimum iOS version worked for me. See this comment; https://github.com/facebook/react-native/issues/34126#issuecomment-1492157907