The recent changes of integrating CocoaPods by default are causing build errors if your Podfile
includes use_frameworks!
. This project was generated by react-native init
with the only change being adding use_frameworks!
to the Podfile
(you can see the working commit here).
- Clone this repo.
- Run
yarn
. - Install pods:
cd ios && pod install
. - Build & run the app:
cd .. && react-native run-ios
You will see build failures that look something like this:
▸ Compiling JSBigString.cpp
❌ /Users/james/src/tmp/AwesomeProject/ios/Pods/Folly/folly/Conv.h:38:10: 'double-conversion/double-conversion.h' file not found
#include <double-conversion/double-conversion.h> // V8 JavaScript implementation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
▸ Compiling JSBundleType.cpp
▸ Compiling MethodCall.cpp
▸ Compiling JSExecutor.cpp
▸ Compiling JSIndexedRAMBundle.cpp
❌ /Users/james/src/tmp/AwesomeProject/ios/Pods/Folly/folly/Conv.h:38:10: 'double-conversion/double-conversion.h' file not found
#include <double-conversion/double-conversion.h> // V8 JavaScript implementation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
▸ Compiling JSDeltaBundleClient.cpp
❌ /Users/james/src/tmp/AwesomeProject/ios/Pods/Folly/folly/Conv.h:38:10: 'double-conversion/double-conversion.h' file not found
#include <double-conversion/double-conversion.h> // V8 JavaScript implementation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
▸ Compiling ReactMarker.cpp
▸ Compiling React-cxxreact-dummy.m
▸ Compiling RAMBundleRegistry.cpp
❌ /Users/james/src/tmp/AwesomeProject/ios/Pods/Folly/folly/Conv.h:38:10: 'double-conversion/double-conversion.h' file not found
#include <double-conversion/double-conversion.h> // V8 JavaScript implementation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
▸ Compiling NativeToJsBridge.cpp
▸ Compiling ModuleRegistry.cpp
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening AwesomeProject.xcworkspace. Run CLI with --verbose flag for more details.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/james/src/tmp/AwesomeProject/ios/build/AwesomeProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-cxxreact.build/Objects-normal/x86_64/JSBigString.o /Users/james/src/tmp/AwesomeProject/node_modules/react-native/ReactCommon/cxxreact/JSBigString.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
use_frameworks!
is a commonly used method on the Podfile
DSL. Many pods do not work without it.
I have been able to fix the error shown in the log above with some .podspec
changes, but there are few more errors I haven't been able to solve. You can see my WIP react-native
branch here.