Skip to content

A project to demonstrate a React Native issue with CocoaPods frameworks

Notifications You must be signed in to change notification settings

jtreanor/react-native-cocoapods-frameworks

Repository files navigation

React Native 0.60.0 fails to build with CocoaPods frameworks

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).

Steps to reproduce

  1. Clone this repo.
  2. Run yarn.
  3. Install pods: cd ios && pod install.
  4. 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)

Why does this matter

use_frameworks! is a commonly used method on the Podfile DSL. Many pods do not work without it.

Causes and fixes

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.

About

A project to demonstrate a React Native issue with CocoaPods frameworks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published