question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When new Xcode build system is used, Xcode build fails to download third-party dependencies

See original GitHub issue

Workaround (edit by @hramos)

You may work around this by manually installing third party dependencies into your project. The following steps are based on the workaround provided by @lyon007 in #14382.

  1. rm -rf node_modules/ && yarn cache clean && yarn install and rm -rf ~/.rncache
  2. cd node_modules/react-native/scripts
  3. ./ios-install-third-party.sh If your network is slow, you can download the packages separately and move them to the rncache folder 1. folly-2016.10.31.00 2. double-conversion-1.1.5 3. glog-0.3.5 4. boost_1_63_0
  4. cd <Your-Project-Folder>/node_modules/react-native/third-party/glog-0.3.5
  5. ../../scripts/ios-configure-glog.sh
  6. Xcode Clean & Build

Original issue

Environment

React Native Environment Info: System: OS: macOS High Sierra 10.13.6 CPU: x64 Intel® Core™ i7-4870HQ CPU @ 2.50GHz Memory: 103.23 MB / 4.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.9.0 - ~/.nvm/versions/node/v10.9.0/bin/node npm: 6.4.0 - ~/.nvm/versions/node/v10.9.0/bin/npm SDKs: iOS SDK: Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0 IDEs: Xcode: 10.0/10L221o - /usr/bin/xcodebuild npmPackages: react: 16.4.1 => 16.4.1 react-native: 0.56.0 => 0.56.0 npmGlobalPackages: react-native-cli: 2.0.1

Description

First build request after yarn or npm install does not succeed due to apparent timing of download, extract, and compile actions. Subsequent builds succeed until node_modules removed and yarn or npm install run again.

Similar to this closed issue: https://github.com/facebook/react-native/issues/18982

This is not a problem in the local development environment as the work around is to simply rerun the build command. However, with remote build environments (Buddybuild, App Center, etc) this becomes problematic.

Reproducible Demo

Follow these steps:

0 - configure environment as per react-native info above 1 - from shell - react-native init DoubleTrouble 2 - from shell - cd DoubleTrouble 3 - from shell - react-native run-ios

Here is the tail end of output I received:

** BUILD FAILED **

The following build commands failed:

CompileC /Users/mcclen/Developer/DoubleTrouble/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/strtod.o /Users/mcclen/Developer/DoubleTrouble/node_modules/react-native/third-party/double-conversion-1.1.5/src/strtod.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler

(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/DoubleTrouble.app An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22): Failed to install the requested application The bundle identifier of the application could not be determined. Ensure that the application’s Info.plist contains a value for CFBundleIdentifier. Print: Entry, “:CFBundleIdentifier”, Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/DoubleTrouble.app/Info.plist Print: Entry, “:CFBundleIdentifier”, Does Not Exist

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:83
  • Comments:131 (29 by maintainers)

github_iconTop GitHub Comments

119reactions
thefajcommented, Sep 19, 2018

Ok, I think I have a temporary fix to get React Native to work with Xcode 10—change the shared project settings (or shared workspace settings if you’re also using Cocoapods) to use the “Legacy Build System”. File->Project/Workspace Settings->Build System: Legacy Build System.

It’s (not really) surprising that Facebook hasn’t fixed this in the months that have passed since WWDC18. Good luck, everyone.

EDIT: This issue didn’t always happen in Xcode on the Mac. It regularly failed when I pushed to a CI system like BuddyBuild.

37reactions
0ffcommented, Sep 25, 2018

We ran into the same problem and fixed it by adding this as a postinstall step to our package.json:

cd node_modules/react-native/React/..; exec ./scripts/ios-install-third-party.sh

This will run the script in the correct directory which will make it pass later in the build process.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolving common configuration and build issues
A common cause of failing builds is that Xcode Cloud can't access the Package.resolved file that it needs to resolve your Swift Package...
Read more >
Xcode Cloud Testing fails to archive project - Stack Overflow
Xcode Cloud temporary build environment doesn't include third party tools like CocoaPods. But you can include them using post clone script.
Read more >
Behind the Scenes of the Xcode Build Process - WWDC NOTES
the build system takes the build description in your Xcode project file, parses it, takes into account all the files in your project,...
Read more >
How to build Skia
Make sure you have first followed the instructions to download Skia. Skia uses GN to configure its builds. is_official_build and Third-party Dependencies. Most ......
Read more >
Building Arrow C++ — Apache Arrow v10.0.1
The build system supports a number of third-party dependencies ... Xcode is the IDE provided with macOS and can be use to develop...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found