Home > Software engineering >  Build failed for IOS when rebuilding React Native project
Build failed for IOS when rebuilding React Native project

Time:03-25

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)

CodePudding user response:

Perform the below steps:

  1. delete node_modules folder
  2. npm install or yarn install
  3. delete pods folder and Podfile.lock file
  4. cd ios && pod install
  5. Run the project npx react-native run-ios

Hope it works!

  • Related