Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 329
Muhammad Ashfaq Avatar asked Nov 25 '25 02:11

Muhammad Ashfaq


2 Answers

after each time pod-install => clean build XCode > Product > Clean Build Folder(command + shift + k) => rebuild, that work. The problem is with rn > 0.67.0, pod-cache pointing to the old file. https://github.com/facebook/react-native/commit/01856633a1d42ed3b26e7cc93a007d7948e1f76e

like image 111
Viết Kenji Gi Avatar answered Nov 26 '25 17:11

Viết Kenji Gi


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.

like image 30
Miguel Rios R Avatar answered Nov 26 '25 17:11

Miguel Rios R