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

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

About this issue

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

Commits related to this issue

Most upvoted comments

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.

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.

Workaround in OP worked for me but with some little adjustments in steps 2 and 3: 2. cd node_modules/react-native 3. ./scripts/ios-install-third-party.sh

Oherwise, it would create the third-party folder inside scripts folder, not in react-native (which is the right one).

Also, I had to follow this to correctly link to libfishhook.a file in RCTWebSocket library.

And a final thing (couldn’t verify this is required, maybe my dependencies were outdated) was running a pod install inside ios folder to update dependencies.

Here is what worked for me:

$ cd node_modules/react-native
$ scripts/ios-install-third-party.sh
$ cd third-party/glog-0.3.5/
$ ../../scripts/ios-configure-glog.sh

For anyone else struggling with this issue, I’ve written a script and posted it to a gist which makes this a one-line fix:

curl -L https://git.io/fix-rn-xcode10 | bash

I run this after npm install to fix up the third party folder automatically.

I’m giving up on trying to get Xcode 10 to work…third party dependencies (double-conversion…) cause build errors on BuddyBuild. This seems to be a recurring theme with these massively-dependent open source platforms. 😑

@dale-french In bitrise I have a bash script that uses the code that fiznool created in his gist.

I run it after installing all node_modules but before building the archive.

OMG! I found the solution:

Fix issue with gawk depending on a bad readline. It causes

dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
  Referenced from: /usr/local/bin/awk                                                                                                                                                                                       
  Reason: image not found 

Solution:

brew uninstall gawk
brew uninstall readline
brew install readline
brew install gawk

Xcode build fails to download third-party dependencies

WD=$(pwd)
cd node_modules/react-native
rm -fr third-party
$WD/node_modules/react-native/scripts/ios-install-third-party.sh

I ran into a similar problem using Jenkins and Xcode 10. Here is what I noticed

  1. Download node modules
  2. Run Xcode build. It downloads the third-party folder and runs compile in parallel resulting in a compile error
  3. Run Xcode build a second time. Since third-party folder is already there Xcode build succeeds
  4. Delete third-party folder
  5. Run Xcode build. Same result as step 2
  6. Run Xcode build again. Same result as step 3.

With this new information, I have a workaround. I run the node_modules/react-native/scripts/ios-install-third-party.sh script immediately after npm install on our build machine.

This way, the third party folder and all it’s subfolders are downloaded and ready when we begin compiling the Xcode project which happens a few minutes later since we have to compile react-native bundle in between

I’m also experiencing this. I have tried many of the posts with high upvotes on this issue (https://github.com/facebook/react-native/issues/14382) and have still not reached a solution. Going to try re-install old XCode version and copy iOS 12 support files from beta.

EDIT: Downgrading fully resolved. Download both XCode 10 and XCode 9.4.1 from here (https://developer.apple.com/download/more/) and follow instructions here (https://stackoverflow.com/questions/51215836/ios-12-not-supported-by-xcode-9-4-could-not-locate-device-support-files)

Yes. For both 0.56.1 and 0.57.1 that gets me around the error. I modified it a bit:

    "postinstall": "cd node_modules/react-native; exec ./scripts/ios-install-third-party.sh; cd third-party/glog-0.3.4; exec ./configure; cd ../../../.."

Clearly, if you’re using the Heinz 57 variety, you want the glog-0.3.5 directory.

This appears to be solved in 0.57.8, based on comments in the thread and lack of activity since that version was released.

If I am wrong, let me know and I can re-open.

I understand your point @hramos. But sometimes when we introduce projects with clients and their requirements, we always cross our fingers with React-native that we told the client that yes we can make a video player with these above features or we can make a push notification type apps. But when we are going to build the app, then only we know the fact that we are fully dependent on third-party libraries. And at that time we can’t deliver the app in correct time.

Even just because we can’t be sure about that with RN what’s the limitations in some areas, we lose a project and it goes to native development.

If we can’t take projects then we can’t make RN useful.

FWIW, I just upgraded a rather complicated old React Native project to 0.57.0 and set it up using CocoaPods and everything builds fine with Xcode 10. See below for my environment details…

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
      Memory: 717.64 MB / 32.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.9.0 - ~/.nvm/versions/node/v10.9.0/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v10.9.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
    IDEs:
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0
      react-native: 0.57.0 => 0.57.0
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1

I encountered a lot of problems surrounding this issue after upgrading my react-native to the latest version. In the end for me the issue was solved by fixing the path of glogs in the ios-install-third-party.sh script to: "\"../../$SCRIPTDIR/ios-configure-glog.sh\""

In the original file the path is "\"$SCRIPTDIR/ios-configure-glog.sh\"", causing an error during running of the script, and later also errors of 'glog/logging.h' file not found later on; Presumably because the files are not findable by the other third-party libraries, as those are installed without the glog configuration script having ran.

So after running npm/yarn, change the ios-install-third-party.sh script, then run it while in the node_modules/react-native directory. Xcode is on the new build system, changing it did not do anything for me so I left it on the new.

Hope this helps others, I spent quite some hours working my way through this. If someone has any idea of what the underlying issue might be, please inform us all. I encountered this problem while upgrading my project from an older react-native version, so that may be the cause somehow, at least in my case.

This almost gave me an aneurysm. @laurent22 solution actually worked for me, first time though. I was using Yarn, but same thing pretty much:

  • rm yarn.lock && rm -rf ios/build/ && rm -rf node_modules/ && yarn install && react-native run-ios

Might be worthwhile just checking to see if most of that is unnecessary. Maybe just deleting the ios/build folder would fix it. Not sure though.

Xcode 10.0.x, on macOS 10.13 (High Sierra)

I had the same issue like this: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Release-iphonesimulator/MyCool.app/Info.plist Print: Entry, “:CFBundleIdentifier”, Does Not Exist…

I found a quick and very simple solution for myself, hope it will help others!

Try this:

react-native init projectname cd projectname react-native start (this does the trick, leave this running in terminal) …then, in a new terminal: cd projectname react-native run-ios

It will take a while, don’t do ctrl-c, the project will build!

😃

rm -rf node_modules
npm cache verify
npm install
rm -rf ~/.rncache
cd node_modules/react-native
./scripts/ios-install-third-party.sh
cd -
cd node_modules/react-native/third-party/glog-0.3.4 # brittle as fudge
./configure
cd -
npm run ios:release

did not work for me, building on Bitrise. upgrading to 0.57 isn’t an option for my team.

“full” output:

** BUILD FAILED **
The following build commands failed:
	CompileC /Users/vagrant/git/ios/build/Build/Intermediates.noindex/React.build/Release-iphonesimulator/third-party.build/Objects-normal/i386/signalhandler.o /Users/vagrant/git/node_modules/react-native/third-party/glog-0.3.4/src/signalhandler.cc normal i386 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Release-iphonesimulator/MyCool.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/Release-iphonesimulator/MyCool.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

My workaround was working until Friday. No idea what happened but it’s not working anymore.

The “manual” workaround isn’t working either.

This is a major show stopper for our team.

@nbokmans fair enough, but then none of workarounds suggested is a solution. Some work for some, others don’t. This has to be fixed in the react-native build system.

This worked for me

$ cd node_modules/react-native/scripts && ./ios-install-third-party.sh && cd ../../../
$ cd node_modules/react-native/third-party/glog-0.3.5/ && ../../scripts/ios-configure-glog.sh && cd ../../../../

https://github.com/facebook/react-native/issues/21168#issuecomment-422431294

@hramos

Do you have any timeline when React native will be fully supporting xcode 10? Lots off issues are happening. Clients are just waiting for apps to be shipped and we are sitting fingers crossed to get updates 😦

Only viable solution that persists across ci builds seems to be using legacy build system

same issue in Xcode 10

I am facing a little different issue

when i run ./ios-install-third-party.sh Unpacking /Users/shayana/Library/Caches/com.facebook.ReactNativeBuild/glog-0.3.5.tar.gz… ./ios-install-third-party.sh: line 66: ./ios-configure-glog.sh: No such file or directory Unpacking /Users/shayana/Library/Caches/com.facebook.ReactNativeBuild/double-conversion-1.1.6.tar.gz… Unpacking /Users/shayana/Library/Caches/com.facebook.ReactNativeBuild/boost_1_63_0.tar.gz…

Still I ran cd <Your-Project-Folder>/node_modules/react-native/scripts/third-party/glog-0.3.5 instead of cd <Your-Project-Folder>/node_modules/react-native/third-party/glog-0.3.5

But still same issue.

[RN 0.59.4 / Xcode 10.2] I am using cocoapods. If I use legacy build system, Xcode builds target ‘React’ first and other library Later. Build is success. But if i use new build system, Xcode builds third-party-library first instead of ‘React’. Build error message is ‘React/RCT~Module.h’ file not found in library’s .m file…

And If i use Xcode 10.1, Using new build system is fine. Build is success… How can i set build target Order?

I’m having this issue on RN 0.59.1. This happens after running react-native run-ios from a freshly initialized project.

It appears that the scripts/ios-install-third-party.sh script is failing on MacOS.

Unknown option: p
Type shasum -h for help
Unpacking /Users/kevin/Library/Caches/com.facebook.ReactNativeBuild/glog-0.3.5.tar.gz...
./scripts/ios-install-third-party.sh: line 64: ./scripts/ios-configure-glog.sh: No such file or directory
Unknown option: p
Type shasum -h for help
Unpacking /Users/kevin/Library/Caches/com.facebook.ReactNativeBuild/double-conversion-1.1.6.tar.gz...
Unknown option: p
Type shasum -h for help
Unpacking /Users/kevin/Library/Caches/com.facebook.ReactNativeBuild/boost_1_63_0.tar.gz...
boost_1_63_0/boost/log/detail/format.hpp: (Empty error message)
tar: Error exit delayed from previous errors.
Unpacking '/Users/kevin/Library/Caches/com.facebook.ReactNativeBuild/boost_1_63_0.tar.gz' failed. Debug info:
-rw-r--r--  1 kevin  staff  7049801 Mar 21 21:37 /Users/kevin/Library/Caches/com.facebook.ReactNativeBuild/boost_1_63_0.tar.gz
e57f86fe1b3fc5b54e73a11ea9b29b14c0ee140e  /Users/kevin/Library/Caches/com.facebook.ReactNativeBuild/boost_1_63_0.tar.gz
Unknown option: p
Type shasum -h for help
Unpacking /Users/kevin/Library/Caches/com.facebook.ReactNativeBuild/folly-2018.10.22.00.tar.gz...

The version of shasum is 6.01 and seems to be missing an option for the p flag.

So I removed the -p from if shasum -p "$cachedir/$file" | on line 35 of scripts/ios-install-third-party.sh. Then I ran the script again.

I ran into the problem.

./scripts/ios-install-third-party.sh: line 64: ./scripts/ios-configure-glog.sh: No such file or directory

This is due to ios-configure-glog.sh being ran in the wrong directory. So I went into third-party/glog-0.3.5 and ran ../../scripts/ios-configure-glog.sh.

After all this, I was finally able to build and run the project in xcode.

IT IS STILL NOT WORKING ON REACT-NATIVE 0.59.1

$ react-native run-ios
info Found Xcode project test4.xcodeproj
info Building using "xcodebuild -project test4.xcodeproj -configuration Debug -scheme test4 -destination id=564347E4-D73D-4AE3-892F-F7F8FDD5F51C -derivedDataPath build/test4"
▸ Running script 'Install Third Party'
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 test4.xcodeproj

** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution Install\ Third\ Party /Users/hiepnm/workspace/temp/test4/ios/build/test4/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh
(1 failure)

Looks like @kelset is on top of it - he mentions he’ll try to include @mmccartney’s fix in 0.57.5: https://github.com/react-native-community/react-native-releases/issues/54#issuecomment-436273232

@geminiyellow the original script I posted only worked for RN 0.57, I’ve updated it now and it should work with other (older) versions too, for example 0.55.4 which is used by the create-react-native-web-app generator.

curl -L https://git.io/fix-rn-xcode10 | bash

@ujwal-setlur Changing back to legacy build system is not an option for people who rely on Fastlane or other automatic build tools which don’t care about your XCode settings. It’s not a solution.

OP: https://github.com/facebook/react-native/issues/19529#issuecomment-427217974

I wrote something a bit cleaner for my purposes and installed the fix within the node_modules/react-native package. Normally I would prefer not to modify a node_module directly, but under this circumsance I felt that it was worth it and allowed us to add a simple script in our yarn start script and we get a clean run from a fresh clone in multiple products.

“react-native-vector-icons”: “4.5.0” this script can be useful for a bug relating to this package. rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json

glog-0.3.4

Xcode 9.2: “react”: “15.4.1” / “react-native”: “0.38.1” Xcode 9.4.1: “react”: “16.0.0-alpha.12” / “react-native”: “0.53.0”

cd node_modules/react-native && scripts/ios-install-third-party.sh && cd third-party && cd glog-0.3.4 && ./configure && cd ../../../../

glog-0.3.5

Xcode 9.4.1: react": “16.5.0” / “react-native”: “0.57.1” / “metro-react-native-babel-preset”: “0.47.0” Xcode 10: react": “16.5.0” / “react-native”: “0.57.1” / “metro-react-native-babel-preset”: “0.47.0”

cd node_modules/react-native && scripts/ios-install-third-party.sh && cd third-party && cd glog-0.3.5 && ./configure && cd ../../../../

manual npm install or yarn - install packages cd node_modules/react-native - go to node modules directory scripts/ios-install-third-party.sh- install @ node_modules/react-native/third-party cd third-party - go to newly created third party directory cd glog-0.3.x - ls -la to find your directory version number or just use tab to auto-complete ./configure - run setup cd ../../../../- change back to your project directory react-native run-ios or react-native run-android - deploy

I got this error while archiving. Did everything mentioned… but nothing worked. The error was at signalhandler.cc > GetPC method.

replaced return (void*)context->PC_FROM_UCONTEXT; with return NULL;

I’m still seeing issues with XCode 10’s new build system on react-native@0.58.3, the latest. I get build errors regarding third-party when trying to react-native run-ios.

The workaround where you can manually pre-compile glog doesn’t seem to work anymore. I get the error “Call to unavailable function ‘system’: not available on iOS” when trying to compile glog, even after using the ios-configure-glog.sh script.

For me, disabling the new build system in favor of the legacy system still works as a workaround.

For those using automatic/command-line build tools (i.e. fastlane, ci), attach to -UseModernBuildSystem=NO or -UseModernBuildSystem=N to the xcodebuild command to switch to the Legacy Build System.

https://github.com/facebook/react-native/issues/19573 https://github.com/facebook/react-native/issues/20492#issuecomment-423181560

What did the trick for me, close Xcode and then:

$ rm -rf node_modules $ yarn install $ cd node_modules/react_native/scripts $ ./ios-install-third-party.sh $ cd /third-party/glog* $ sudo ./configure

I was able to use the workaround suggested by @NNaidoo, however replacing the “./configure” part with the following:

…/…/scripts/ios-configure-glog.sh

My post tracking Xcode 10 related issues was created on June 5, the day of the WWDC 2018 Keynote: https://github.com/facebook/react-native/issues/19573, by the way. That’s still a year too late, as the new build system was introduced during WWDC 2017, but it’s hardly a new issue in this tracker. As the developer tooling is updated every year, we depend on volunteers using the betas to surface any issues and fixes in time for the general release.

I failed to note that between the initial report of the issue and now I have upgraded to 0.57.0 and that did not solve the problem. I’ve also upgrade node and npm and that has not resolved the issue either. So far for me it is the Legacy Build System setting that seems to fix the build issue. Makes sense as I had no problem with Xcode 9.4.1.

My question now is what is the difference between the two build systems and is the difference material?

On Sep 19, 2018, at 12:19 AM, Paul Mestemaker notifications@github.com wrote:

I have create-react-native-app installed, but I did not use it for this project. I used react-native init to create the project and then manually migrated the source files from a much older version of RN.

I’m curious if you upgrade from 0.56.0 to 0.57.0, if that will solve your problem without the Legacy Build System workaround.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/20774#issuecomment-422684998, or mute the thread https://github.com/notifications/unsubscribe-auth/AAP7X9JOhep39fDihiJ0GK2WBINqhoQFks5uce_mgaJpZM4WGsiv.

Same issue here. Any update?

I’m still encountering this issue as of 0.59.3 after following the React Native CLI getting started on macOS and iOS latest version of Xcode

Hello @hiepnm 👋!

By using the repro / the list of steps to reproduce, we can’t actually see the reported bug on RN 0.59 so we’ll close this issue. It may have something to do with your local setup, please double check that you are using the correct version of Android Studio / XCode / Android NDK / Yarn / etc.

Reference issue for XC10 support https://github.com/facebook/react-native/issues/19573

@hramos I think this issue should be updated here as well https://github.com/facebook/react-native/issues/19573

Including navigation, maps, and video players in the core library is a non-goal. We’re working on slimming down the core library in order to increase stability. See https://github.com/react-native-community/discussions-and-proposals/issues/6.

The new version is working in both platform ios and android. Please check the version I have in my project react native 0.57.8.

But it breaking in old react-native version (for my case 0.54.4). I am facing build issue of third-party and some double conversion errors and it’s breaking the project.

When specific version downloading with react-native init projectname --version 0.54.4 its breaking in xcode build and giving double conversion and all thirdparty error after fixing all those it’s giving error in cxxreact so basically I have wasted three working days with it and fade up with it.

Client is waiting for the update and it’s being very difficult for us to always maintain the deadlines with react native. It’s need to be stable in some point.

Giving a example that when react-native working with it’s new update but some thirdparty dependencies gives error and we can’t blame react-native team for the thirdparty library errors.

But Why not react native includes some basic feature within it’s library and not dependent on others. Like: react-native-image-picker, vectoricons, navigation, drawer, device info, image zooming, maps, video players, file access system. It will be good to see react-native just like full bootstrap with UI and functionality.

I am using it from when 2015 and faced many update breaks everytime. In future, I am planing to upload own apps build in RN with many cool things but if it’s not stable at the point it’s tough to manage all the projects.

React Native Environment Info:

System:
  OS: macOS High Sierra 10.13.6
  CPU: (4) x64 Intel(R) Core(TM) i5-3330S CPU @ 2.70GHz
  Memory: 28.89 MB / 8.00 GB
  Shell: 3.2.57 - /bin/bash

Binaries:
  Node: 8.9.3 - /usr/local/bin/node
  npm: 5.5.1 - /usr/local/bin/npm
  Watchman: 4.9.0 - /usr/local/bin/watchman

SDKs:
  iOS SDK:
    Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1

 Android SDK:
    API Levels: 23, 24, 25, 26, 27, 28
    Build Tools: 23.0.1, 24.0.0, 25.0.0, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.3
    System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom, android-24 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom_64, android-26 | Google Play Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom

IDEs:
  Android Studio: 3.0 AI-171.4443003
  Xcode: 10.1/10B61 - /usr/bin/xcodebuild

npmPackages:
  react: 16.6.3 => 16.6.3 
  react-native: 0.57.8 => 0.57.8 

npmGlobalPackages:
  create-react-native-app: 1.0.0
  react-native-cli: 2.0.1
  react-native-create-library: 3.1.2
  react-native-git-upgrade: 0.2.7
  react-native-rename: 2.4.0

@hramos

Deleted my repo and cloned a fresh copy. Installed dependencies with yarn and the third-party errors appeared when trying to archive.

Deleted my repo and cloned a fresh copy. Installed dependencies with npm install and the third-party errors did not appear when trying to archive.

I believe there could be something with yarn not installing all the necessary dependencies either in the right order, or not running everything it needs to which then leads to this issue.

I’m also using the legacy build option as i’m running an older version of React Native so i’m not sure if that also matters. ^0.55.4 to be exact.

this workaround worked for me 1- cd ios 2- pod install

For me the solution was to delete all cache, build and lock files:

rm package-lock.json && rm -rf ios/build/ && rm -rf node_modules/ && npm install && react-native run-ios

Then the first call to react-native run-ios fails, but by running it a second time it works.

Yeah the docs should be up to date 😃 If not, can you open an issue on the website repo so that we can work it out?

My understanding is that the fix will only work for new projects - for existing projects probably the only ways are:

  1. re-apply the workaround described in the first comment
  2. manually apply the PR to your project - I use Pods on my projects so I was never actually affected, so can’t really test this road. Potentially using the git-upgrade command may do it for this. But I don’t know tbh 😔

Can anyone try and comment here?

@hramos , still getting Xcode 10 errors on react-native 0.57.5

immagine

The release process is coordinated in the https://github.com/react-native-community/react-native-releases repository. https://github.com/react-native-community/react-native-releases/issues/54 looks like a good issue to discuss adding this to a 0.57.5 release.

Update, I had added this cd node_modules/react-native && scripts/ios-install-third-party.sh && cd third-party && cd glog-0.3.4 && ./configure && cd ../../../../ workaround to my postinstall.

That worked fine until I attempted to build in Release mode, this commands breaks something in third-part library build related.

This discussion helped me https://github.com/facebook/react-native/issues/19839#issuecomment-422381866

Update, what solved for us was:

  1. @NNaidoo workaround
  2. Remove the library https://github.com/crazycodeboy/react-native-splash-screen from the ios project.
  3. Ensure the build configuration in the scheme image

Running the postinstall script to unpack and configure the third party packages and using the new build system also works for me. In fact, I have switched to that workaround.


iOS Build Issues?

Try these:

rm -rf node_modules
npm install

Also do this:

  1. Close Xcode.

  2. Open Terminal, go to your project’s root folder and do: cd node_modules/react-native/third-party/glog-0.3.4/

  3. Then, run the configure script: ./configure

  4. Fix reference to libfishhook.a in RCTWebSocket: https://github.com/facebook/react-native/issues/19569#issuecomment-394869470

Still not working? Try this: https://github.com/facebook/react-native/issues/21168#issuecomment-422525950


Android problems? Try these:

rm -rf android/.gradle
rm -rf android/build
rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache verify
rm -rf $TMPDIR/haste-map-react-native-packager-*

There’s no single fix that will provide full support for Xcode 10. We are tracking all known issues so far in https://github.com/facebook/react-native/issues/19573. For each of those, the community will need to provide a pull request with a fix. Ideally, we’d get PRs to fix all of these in time for the 0.58 release cut.

If you’re blocked by Xcode 10 issues, the best course of action is to make sure the issue is logged in https://github.com/facebook/react-native/issues/19573, followed by sending a PR to fix the issue.

I have create-react-native-app installed, but I did not use it for this project. I used react-native init to create the project and then manually migrated the source files from a much older version of RN.

I’m curious if you upgrade from 0.56.0 to 0.57.0, if that will solve your problem without the Legacy Build System workaround.