<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest React Native release to make sure your issue has not already been fixed: http://facebook.github.io/react-native/docs/upgrading.html -->
System: OS: macOS 10.14.6 CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz Memory: 249.73 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node Yarn: 1.12.3 - /usr/local/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3 IDEs: Android Studio: 3.4 AI-183.6184.108.40.20692245 Xcode: 10.3/10G8 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.5 => 0.60.5 npmGlobalPackages: react-native-cli: 2.0.1
react-native init FirstNative
cd FirstNativeand run
react-native init TestNativeProject
Success of building the project
The result is following error.
** BUILD FAILED **
The following build commands failed: CompileC /Users/LeeMoonki/Desktop/FirstNative/ios/build/FirstNative/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Folly.build/Objects-normal/x86_64/Unicode.o /Users/LeeMoonki/Desktop/TestNativeProject/ios/Pods/Folly/folly/Unicode.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (1 failure)
To see the exact error, I run the workspace of this project in the Xcode(v10.3) then the following error is occurred.
'folly/CppAttributes.h' file not found ColdClass.h
I struggled to build react native project in iOS with this issue. And I did build after following processes.
rm -rf ~/Library/Caches/CocoaPods rm -rf Pods rm -rf ~/Library/Developer/Xcode/DerivedData/* pod deintegrate pod setup
Podsdirectory. The location of it is
project directory > ios > Pods.
project directory > ioslocation, install pod with
react-native run-iosin project directory.
After I faced the issue, I try to build the project in another Mac and work fine. And I found the every error is from
folly and it is in
Pods. Then I compared
Pods directory between mine and another Mac environment. In my case, there are missing files. So I reference the comment written by kelset in 'folly/folly-config.h' file not found, said "This happens when your pod cache is corrupted.". So I check the way of clearing cache of pod, and it works.