New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 10: Build input file double-conversion cannot be found #21168

Closed
rodrigoelp opened this Issue Sep 18, 2018 · 44 comments

Comments

Projects
None yet
@rodrigoelp

rodrigoelp commented Sep 18, 2018

Environment

>> react-native info 

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
      Memory: 554.38 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.12.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:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: 0.57.0 => 0.57.0 

Description

The cli is broken once you have installed xcode 10. Creating any new project will render the same issue (compilation failure) as it seems to be failing compiling double conversion as illustrated below:

react-native run-ios
Found Xcode project awesome.xcodeproj
Launching iPhone 6 (iOS 12.0)...
Building using "xcodebuild -project awesome.xcodeproj -configuration Debug -scheme awesome -destination id=F0EA48DA-E7A0-4E8F-92B3-3D4A2AA93B76 -derivedDataPath build"
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.h
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/yoga/yoga/YGEnums.h
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/yoga/yoga/YGMacros.h
▸ Compiling YGStyle.cpp
▸ Compiling YGLayout.cpp
▸ Compiling Yoga.cpp
▸ Compiling YGNode.cpp
▸ Compiling YGNodePrint.cpp
▸ Compiling YGFloatOptional.cpp
▸ Compiling YGEnums.cpp
▸ Compiling Utils.cpp
▸ Analyzing Yoga.cpp
▸ Analyzing YGStyle.cpp
▸ Analyzing YGNodePrint.cpp
▸ Analyzing YGNode.cpp
▸ Analyzing YGLayout.cpp
▸ Analyzing YGFloatOptional.cpp
▸ Analyzing YGEnums.cpp
▸ Analyzing Utils.cpp
▸ Building library libyoga.a
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/jsinspector/InspectorInterfaces.h
▸ Compiling InspectorInterfaces.cpp
▸ Analyzing InspectorInterfaces.cpp
▸ Building library libjsinspector.a
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/privatedata/PrivateDataBase.h
▸ Compiling PrivateDataBase.cpp
▸ Analyzing PrivateDataBase.cpp
▸ Building library libprivatedata.a
▸ Running script 'Install Third Party'
▸ Compiling strtod.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/strtod.cc'


▸ Compiling fast-dtoa.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/fast-dtoa.cc'


▸ Compiling fixed-dtoa.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/fixed-dtoa.cc'


▸ Compiling double-conversion.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/double-conversion.cc'


▸ Compiling diy-fp.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/diy-fp.cc'


▸ Compiling cached-powers.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/cached-powers.cc'


▸ Compiling bignum.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/bignum.cc'


** BUILD FAILED **


The following build commands failed:
	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/strtod.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/strtod.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler

	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fast-dtoa.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/fast-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fixed-dtoa.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/fixed-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/double-conversion.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/double-conversion.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/diy-fp.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/diy-fp.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/cached-powers.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/cached-powers.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/bignum.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/bignum.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(7 failures)

Installing build/Build/Products/Debug-iphonesimulator/awesome.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/awesome.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist


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

    at checkExecSyncError (child_process.js:602:13)
    at Object.execFileSync (child_process.js:622:13)
    at Promise.then (/Users/rod/dev/react/testing/awesome/node_modules/react-native/local-cli/runIOS/runIOS.js:208:5)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)

Reproducible Demo

  1. Let you mac update to xcode 10 and command line tools.
  2. Create brand new project react-native init awesomeApp
  3. Once it has finished setting up, run cd awesomeApp && react-native run-ios

Workaround for new projects

Once the project has been initialised, kill facebook's team identifiers with

sed -i '' '/DevelopmentTeam = V9WTTPBFK9/d;/DEVELOPMENT_TEAM/d;/ProvisioningStyle = Automatic/d' ./node_modules/react-native/React/React.xcodeproj/project.pbxproj

Running react-native run-ios this time should work.

@otaviogaiao

This comment has been minimized.

otaviogaiao commented Sep 18, 2018

I was having a similar issue, in my case, just accepting the xcode license solved all issues.

@kelset kelset added the 🔷iOS label Sep 18, 2018

@kelset

This comment has been minimized.

Collaborator

kelset commented Sep 18, 2018

Support for XCode 10 is not fully tested yet - please refer to #19573 to know what's the current status. That said if accepting the license is the solution please close this issue.

@omatrot

This comment has been minimized.

omatrot commented Sep 18, 2018

I have the same errors with an existing project, building in XCode or from React Native CLI. Probably not a licence issue.

@mattijsf

This comment has been minimized.

Contributor

mattijsf commented Sep 18, 2018

I was facing a similar issue after upgrading. To solve it I ran the following commands:

$ 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 ../../../../

Now Xcode builds fine.

@kelset

This comment has been minimized.

Collaborator

kelset commented Sep 18, 2018

Do you have to run those commands on new projects too @mattijsf? Or projects created after you have XCode 10 installed "just work"?

@IljaDaderko

This comment has been minimized.

IljaDaderko commented Sep 18, 2018

In my case this answer helped
https://stackoverflow.com/questions/50718018/xcode-10-error-multiple-commands-produce/50721769

Had to remove info plist files from specified location, there are couple caveats in XCode 10 that are not necessarily react-native specific.

@chrisbianca

This comment has been minimized.

chrisbianca commented Sep 18, 2018

I'm seeing the same too. @mattijsf's solution did allow iOS to compile, however as a side effect, I then saw the following errors when trying to run the Android version:

Failed to capture snapshot of input files for task ':app:bundleReleaseJsAndAssets' property '$1' during up-to-date check.
Could not list contents of '/node_modules/react-native/scripts/third-party/glog-0.3.5/test-driver'. Couldn't follow symbolic link

Clearing down node_modules and re-running npm install allowed Android to compile, but failed on iOS again.

@kelset In response to your question above - this happened both on an old project created before XCode 10 was installed and a new project created after XCode 10 was installed. It happens on both RN 0.56 and 0.57.

@IljaDaderko

This comment has been minimized.

IljaDaderko commented Sep 18, 2018

@chrisbianca This happened to me on existing project, try to remove your node modules, clear watchman cache and yarn / npm cache to re-install everything (maybe even try clearing lock files if you can). After I did all that, third party issue wen't away.

This issue has more info: #14382

@mattijsf

This comment has been minimized.

Contributor

mattijsf commented Sep 18, 2018

@kelset I have the same problem after I bootstrap a new project using react-native init and opening ios/[project].xcodeproj in Xcode 10.

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
      Memory: 1.84 GB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.3.0 - ~/.nvm/versions/node/v8.3.0/bin/node
      Yarn: 1.3.2 - ~/.nvm/versions/node/v8.3.0/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.3.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
      Android SDK:
        Build Tools: 27.0.3, 28.0.2
        API Levels: 25, 26, 27, 28
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: 0.57.0 => 0.57.0 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7
@mattijsf

This comment has been minimized.

Contributor

mattijsf commented Sep 18, 2018

It feels to me this issue is impacted by some parallel build / racing condition...

I can repeat the following script 10x but I get the same error every time:

rm -rf TestAppRN0570 ; react-native init TestAppRN0570 ; cd TestAppRN0570 ; react-native run-ios ; cd ..

Build input file cannot be found: '.../TestAppRN0570/node_modules/react-native/third-party/double-conversion-1.1.6/src/strtod.cc'

However if execute react-native run-ios again for the 2nd time it builds. So basically only the initial run-ios fails.

The same thing can be said with opening the project for the first time in Xcode (without using run-ios) The first build fails, the second build succeeds.

@ChrisChares

This comment has been minimized.

ChrisChares commented Sep 18, 2018

Thanks @mattijsf, solution worked for me as well. Project originally created with Xcode 9, now compiles correctly with 10 after executing those two scripts.

You can execute them directly btw, no need to cd in and out of their directories

# From project root
$ node_modules/react-native/scripts/ios-install-third-party.sh
$ node_modules/react-native/third-party/glog-0.3.5/configure
@mattijsf

This comment has been minimized.

Contributor

mattijsf commented Sep 18, 2018

@ChrisChares I discovered that running the bare configure script actually produces a faulty config.h, causing issues building on physical devices in Xcode 10. Please consider one of the following approaches:

  • Run the build again after it initially failed (only first build fails). This worked best for me.
  • cd node_modules/react-native/third-party/glog-0.3.5/ && ../../scripts/ios-configure-glog.sh
@hramos

This comment has been minimized.

Contributor

hramos commented Sep 18, 2018

The original issue text's workaround for new projects looks like what we already have in place in master (8103c43).

Can people make the change from 8103c43 to their project and verify if that, by itself, solves the issue?

@hramos hramos changed the title from React Native broken with XCode 10 to Xcode 10: Build input file double-conversion cannot be found Sep 18, 2018

@crshumate

This comment has been minimized.

crshumate commented Sep 18, 2018

We had this same issue. We downgraded Xcode to 9.4.1 and it appears to have fixed the build error above.

@jcsena

This comment has been minimized.

jcsena commented Sep 18, 2018

We had this same issue. We downgraded Xcode to 9.4.1 and it appears to have fixed the build error above.

I used this:

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

and this:
link libfishhook.a

and I am working fine

@rodrigoelp

This comment has been minimized.

rodrigoelp commented Sep 18, 2018

Hi, just providing some feedback based on my experience:

  1. I have accepted the license agreement and it did no changes what-so-ever. I also tried this on a brand new machine, clean install (to check if it was the license agreement that for some reason on my computer is accepted but might be an issue) and the crash is completely different.
  2. The issue might be different to the one reported by @mattijsf, I've executed his suggestions and it still does not work on my system.

Cheers!

@geminiyellow

This comment has been minimized.

geminiyellow commented Sep 19, 2018

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

not work for me,

this error

Print: Entry, ":CFBundleIdentifier", Does Not Exist

kill my app.

@lijy91

This comment has been minimized.

lijy91 commented Sep 19, 2018

ios-install-third-party.sh should be exec in the node_modules/react-native directory

My solution, add the code to my scripts/postinstall.sh file

#!/usr/bin/env bash

if [ ! -d "node_modules/react-native/third-party" ]; then
  cd node_modules/react-native ; ./scripts/ios-install-third-party.sh ; cd ../../
  cd node_modules/react-native/third-party/glog-0.3.5/ ; ./configure ; cd ../../../../
fi
@Jaessun

This comment has been minimized.

Jaessun commented Sep 19, 2018

@hramos I created a new project using react-native init then applied the changes from 8103c43 and the behavior is still the same: the error occurred on first build, but the second build succeeded as described by @mattijsf earlier. So I don't think it is related to Facebook's developer team ID.

@mattijsf

This comment has been minimized.

Contributor

mattijsf commented Sep 19, 2018

I actually found that Xcode 10 has a new build system that affects how / when scripts are executed during the Build Phase. I had similar problems in Xcode 10 with other internal projects which generate files during the build phase.

For those projects and react-native I found that switching to the Legacy Build Systems solved the problem where the dependencies (third-party / glog etc) are not correctly generated on the first build.

To switch to the legacy build system do the following:

File -> Project/Workspace Settings...
Under Build System choose: Legacy Build System

Note that the project changes won't be picked up by git because project.xcworkspace is part of the .gitignore file generated by react-native init

@mattijsf

This comment has been minimized.

Contributor

mattijsf commented Sep 19, 2018

@hramos I also found that the changes from 8103c43 didn't had any effect on the failing build

@kelset

This comment has been minimized.

Collaborator

kelset commented Sep 19, 2018

Hey @mattijsf thanks for all the investigation you have been doing, you are being really helpful in finding out how to fix it 👏

Side question:

I found that switching to the Legacy Build Systems

Is it a Xcode project level setting or a general XCode setting? Meaning, would it be a "good enough" workaround for people updating to XCode 10 until we find the root cause?

@mattijsf

This comment has been minimized.

Contributor

mattijsf commented Sep 19, 2018

@kelset It is a project / workspace setting. Once the settings is changed within Xcode a file is written to:
ios/[Project].xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>BuildSystemType</key>
	<string>Original</string>
</dict>
</plist>

(the path will be different for workspaces)

I also tried applying that setting to only node_modules/react-native/React/React.xcodeproj but that won't work. It really needs to be on the "parent" project / workspace that initiates the build.

@cocojoe

This comment has been minimized.

cocojoe commented Sep 19, 2018

Just created a brand new project, I ran into this issue on the Simulator, for me the solution was:

  1. Open the project in Xcode 10 (10A255).
  2. You will see some errors regarding the certificates and it will try to fix itself.
  3. For your default project target Change the target device to Simulator (iPhone 8) (default was physical device)
  4. Hit Build in Xcode to check it's working.

Ran with no problems. Closed down Xcode 10 IDE and went back to CLI:
react-native run-ios --simulator="iPhone 8" all good 👍

@MayeuldP

This comment has been minimized.

MayeuldP commented Sep 19, 2018

copied the file from my ios/build/Build/Products/Debug-iphonesimulator/libfishhook.a
and pasted it into ../node_modules/react-native/Libraries/WebSocket/
and got the build

This one fixed the problem for me. Special thanks here => StackOverflow

@Salakar

This comment has been minimized.

Contributor

Salakar commented Sep 19, 2018

@mattijsf 's suggestion worked for me, it can be found in the xcode ui via:

  1. File -> Project/Workspace settings
  2. Build System: dropdown -> change to Legacy Build system

Temporary workaround of course 👀

@kelset

This comment has been minimized.

Collaborator

kelset commented Sep 19, 2018

@MayeuldP you should not need to do that, since the commit replicating that fix is in 0.57 (a8b7457) 🤔

@MayeuldP

This comment has been minimized.

MayeuldP commented Sep 19, 2018

@MayeuldP you should not need to do that, since the commit replicating that fix is in 0.57 (a8b7457) 🤔

I'm still on RN -v 0.55.3

@WeslleyNasRocha

This comment has been minimized.

WeslleyNasRocha commented Sep 19, 2018

@mattijsf 's suggestion worked for me, it can be found in the xcode ui via:

  1. File -> Project/Workspace settings
  2. Build System: dropdown -> change to Legacy Build system

Temporary workaround of course 👀

I'm on 54.4 and this works

@geminiyellow

This comment has been minimized.

geminiyellow commented Sep 20, 2018

not work for me at all. rollback to xcode 9.4 and wait the official fix.

react-native info

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
      Memory: 526.74 MB / 16.00 GB
      Shell: 5.5.1 - /usr/local/bin/zsh
    Binaries:
      Node: 10.10.0 - /usr/local/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/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
      Android SDK:
        Build Tools: 23.0.1, 26.0.2, 26.0.3, 27.0.2, 27.0.3, 28.0.0, 28.0.0, 28.0.0, 28.0.2
        API Levels: 23, 25, 26, 27, 28
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.3.1 => 16.5.2 
      react-native: 0.55.4 => 0.57.0 
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      create-react-native-web-app: 0.1.6
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7
      react-native-rename: 2.2.2
@TrustTheBoy

This comment has been minimized.

TrustTheBoy commented Sep 20, 2018

rm .rncatch && clear project && run project
If running an error: glog-0.3.x
please cd ./node_modules/react-native/third-party/glog-0.3.x && ./../scripts/ios-configure-glog.sh

@kaushal9678

This comment has been minimized.

kaushal9678 commented Sep 20, 2018

Close everything and restart your system and then run it will work. I was facing the same issue after that it worked.

@dariobanfi

This comment has been minimized.

dariobanfi commented Sep 20, 2018

I tried everything on this thread however I still cannot get it to run.

@kirkcola

This comment has been minimized.

kirkcola commented Sep 20, 2018

I also met this problem after upgrading my Xcode to version 10.
Combining all the possible workarounds above, I fix this by:

Clean RN cache

$ rm -rf ~/.rncache

Re-install the deps

$ cd your_project_path
$ rm -rf node_modules/ && npm install

Then install the third-party

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

Run the commands below if glog installation failed.

$ cd ../third-party/glog-0.3.x
$ ./configure

It works for me, I hope it helps for you.

@mattijsf

This comment has been minimized.

Contributor

mattijsf commented Sep 20, 2018

@kirkcola Have you tried building your project on Generic iOS Device or a Physical device? I would like to know if that works.

@Fortidude

This comment has been minimized.

Fortidude commented Sep 20, 2018

@mattijsf 's suggestion worked for me, it can be found in the xcode ui via:

  1. File -> Project/Workspace settings
  2. Build System: dropdown -> change to Legacy Build system

Temporary workaround of course 👀

Did the job in my case.

React-Native 0.55.4
macOS Mojave, xcode 10

@kirkcola

This comment has been minimized.

kirkcola commented Sep 20, 2018

@mattijsf Yeah, I've tested on a physical device running iOS12.

@radex

This comment has been minimized.

radex commented Sep 20, 2018

Re: #21168 (comment)

That doesn't actually work when building for device because this script needs to be used: https://github.com/facebook/react-native/blob/v0.57.0/scripts/ios-configure-glog.sh to configure glog right and add a config file.

Also, something is wrong with path handling, so you can't call ./scripts/ios-configure-glog.sh from react-native root.

Here's a version that works for me:

if [ ! -d "node_modules/react-native/third-party" ]; then
  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 ../../../../
fi
@vreality64

This comment has been minimized.

Contributor

vreality64 commented Sep 21, 2018

@kirkcola

$ cd ../third-party/glog-0.3.x

Thank you all of your job (with @mattijsf)

However i think it should be cd third-party/glog-0.3.x because of that ../third-party directory are created when configuring done.

$ pwd 
# node_modules/react-native

$ find . -name 'configure' -type f
// before configuring
./scripts/third-party/glog-0.3.x/configure

// after configuring
./scripts/third-party/glog-0.3.x/configure
./third-party/glog-0.3.x/configure
@JOnathanST29

This comment has been minimized.

JOnathanST29 commented Sep 22, 2018

I was facing a similar issue after upgrading. To solve it I ran the following commands:

$ 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 ../../../../

Now Xcode builds fine.

Thank you (with @mattijsf)

@findmory

This comment has been minimized.

findmory commented Sep 24, 2018

I wrote a step by step GIST that encapsulates several of these steps. For me, with the following versions running:

React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
      Memory: 108.35 MB / 16.00 GB
      Shell: 5.4.2 - /usr/local/bin/zsh
    Binaries:
      Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.12.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.1 => 0.57.1
    npmGlobalPackages:
      react-native-cli: 2.0.1

this is the simplest / quickest way to get up and running with a new project

Hope this is helpful to some of you: https://gist.github.com/findmory/52facd61b492b13f0c7f67db4cf79012

@hramos

This comment has been minimized.

Contributor

hramos commented Sep 24, 2018

Duplicate of #20774

@hramos hramos marked this as a duplicate of #20774 Sep 24, 2018

@hramos hramos closed this Sep 24, 2018

@filipepratalima

This comment has been minimized.

filipepratalima commented Sep 25, 2018

Still having build problems after upgrading to Xcode 10.
Ive tried all solutions above, running in Legacy build system, install the third-party script... but now getting...
ld: library not found for -lRNDeviceInfo
:(

@pzatorski

This comment has been minimized.

pzatorski commented Sep 25, 2018

@filipepratalima It means that your library RNDeviceInfo is not linked properly. Please check how to link it manually here:
https://facebook.github.io/react-native/docs/linking-libraries-ios

@facebook facebook locked as spam and limited conversation to collaborators Sep 25, 2018

@hramos hramos added this to the 0.58 RC milestone Sep 25, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.