Search code examples
iosreactjsreact-nativeversionxcodebuild

No member named 'cancelButtonTintColor' in 'JS::NativeActionSheetManager::SpecShowActionSheetWithOptionsOptions'


Description

How to fix this error. I have created simple project with latest version and when try to build the project via Xcode it generate error?

Version

0.67.3

Output of npx react-native info

OS: macOS 11.5.2
CPU: (8) x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
Memory: 83.30 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.18.2 - /usr/local/opt/node@14/bin/node
Yarn: 1.22.15 - /usr/local/bin/yarn
npm: 6.14.15 - /usr/local/opt/node@14/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7583922
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 15.0.2 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.3 => 0.67.3
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Please init new react native project with command and try to build the project in the xcode after pod install


Solution

  • You could create that into the library source or you could avoid it and use the same UIColor option just above it.

    I removed: ( [RCTConvert UIColor:options.cancelButtonTintColor() ? @( options.cancelButtonTintColor()) : nil];* ) and replace it with: ( *[RCTConvert UIColor:options.tintColor() ? @(options.tintColor()) : nil]; )

    my line now looks like:

    UIColor *cancelButtonTintColor =
    [RCTConvert UIColor:options.tintColor() ? @(*options.tintColor()) : nil];
    

    it is not the better way, but you can do it in the meanwhile this is fixed.