19

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

Meisan Saba
  • 800
  • 2
  • 9
  • 25
Muhammad Ashfaq
  • 2,359
  • 5
  • 20
  • 46

3 Answers3

39

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

Viết Kenji Gi
  • 400
  • 1
  • 2
  • 5
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 09 '22 at 14:14
  • 6
    What he said is to clean the build folder on XCode > Product > Clean Build Folder. This worked for me. – Joao Belem Jr. Mar 11 '22 at 18:48
  • 1
    this answer worked thanks! – J-ho Mar 30 '22 at 09:26
19

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.

Miguel Rios R
  • 214
  • 2
  • 2
2

clean build folder after pod install worked for me

in top navigation bar click on Production ---> Clean Build Folder

Sherif Samir
  • 259
  • 3
  • 5