infinitered / ignite-andross

The original React Native boilerplate from Infinite Red - Redux, React Navigation, & more
https://infinite.red/ignite
MIT License
475 stars 151 forks source link

react-native run-ios not working with latest xcode? #225

Closed iamacup closed 5 years ago

iamacup commented 5 years ago

What's going on?

I can't get the boilerplate to run out of the box (Andross)

🔥 igniting app BP2
? Which boilerplate would you like to use? Andross (React Navigation, Redux, & Redux Saga
✔ using the Infinite Red boilerplate v2 (code name 'Andross')
✔ added React Native 0.55.1 in 31.85s
? Would you like Ignite Development Screens? No
? What vector icon library will you use? none
? What internationalization library will you use? none
? What animation library will you use? none
? Would you like to include redux-persist? No
✔ added ignite-ir-boilerplate-andross in 76.16s
✔ added ignite-standard in 25.64s
✔ configured git
✔ ignited BP2 in 156.36s

    Ignite CLI ignited BP2 in 156.36s

    To get started:

      cd BP2
      react-native run-ios
      react-native run-android
      ignite --help

    Read the walkthrough at https://github.com/infinitered/ignite-ir-boilerplate-andross/blob/master/readme.md#boilerplate-walkthrough

    Need additional help? Join our Slack community at http://community.infinite.red.

    Now get cooking! 🍽

react-native run-ios


... build output redacted ...

** BUILD FAILED **

The following build commands failed:

    CompileC /Users/iamacup/Desktop/RNTesting/BP2/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/strtod.o /Users/iamacup/Desktop/RNTesting/BP2/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
    CompileC /Users/iamacup/Desktop/RNTesting/BP2/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/diy-fp.o /Users/iamacup/Desktop/RNTesting/BP2/node_modules/react-native/third-party/double-conversion-1.1.5/src/diy-fp.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    CompileC /Users/iamacup/Desktop/RNTesting/BP2/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/double-conversion.o /Users/iamacup/Desktop/RNTesting/BP2/node_modules/react-native/third-party/double-conversion-1.1.5/src/double-conversion.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    CompileC /Users/iamacup/Desktop/RNTesting/BP2/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/cached-powers.o /Users/iamacup/Desktop/RNTesting/BP2/node_modules/react-native/third-party/double-conversion-1.1.5/src/cached-powers.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    CompileC /Users/iamacup/Desktop/RNTesting/BP2/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/bignum.o /Users/iamacup/Desktop/RNTesting/BP2/node_modules/react-native/third-party/double-conversion-1.1.5/src/bignum.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    CompileC /Users/iamacup/Desktop/RNTesting/BP2/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fast-dtoa.o /Users/iamacup/Desktop/RNTesting/BP2/node_modules/react-native/third-party/double-conversion-1.1.5/src/fast-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    CompileC /Users/iamacup/Desktop/RNTesting/BP2/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fixed-dtoa.o /Users/iamacup/Desktop/RNTesting/BP2/node_modules/react-native/third-party/double-conversion-1.1.5/src/fixed-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(7 failures)

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

Now, when i google around how to fix this CFBundleIdentifier error, there is advice around just building in XCode to fix this, so when i open the xcode project - and try to compile - i get this error:

Lexical or Preprocessor Issue Group
    /Users/iamacup/Desktop/RNTesting/BP2/node_modules/react-native/third-party/glog-0.3.4/src/base/mutex.h:105:10: 'config.h' file not found
        /Users/iamacup/Desktop/RNTesting/BP2/node_modules/react-native/third-party/glog-0.3.4/src/raw_logging.cc:34:10: In file included from /Users/iamacup/Desktop/RNTesting/BP2/node_modules/react-native/third-party/glog-0.3.4/src/raw_logging.cc:34:
            /Users/iamacup/Desktop/RNTesting/BP2/node_modules/react-native/third-party/glog-0.3.4/src/utilities.h:73:10: In file included from /Users/iamacup/Desktop/RNTesting/BP2/node_modules/react-native/third-party/glog-0.3.4/src/utilities.h:73:

Did a bit of googling and there are a couple of ways to fix this - one is here: https://github.com/facebook/react-native/issues/20774

We rebuild in xcode and get this:

RCTWebSocket Group
    Error Group
        :-1: Build input file cannot be found: '/Users/iamacup/Desktop/RNTesting/BP2/node_modules/react-native/Libraries/WebSocket/libfishhook.a'

This got fixed here: https://github.com/facebook/react-native/issues/19569

This issue and the associated PR went into one of the 0.56.x releases - given the current version of react native in the boilerplate is 0.55.1 then it seems to me anyone using the new xcode can't use this BP without faffing around?

I actually haven't managed to get the boilerplate to run because i updated the react-native version to latest (0.57.5) which also needs an update to babel-preset-react-native version ^5.0.1 (which caused a load of peer dependency errors when i did yarn install) and when the project builds, in the emulator it complains about various missing modules

Couple of things to note:


Steps to reproduce


ignite doctor results:


  platform           darwin                                                                                     
  arch               x64                                                                                        
  cpu                8 cores                               Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz  
  directory          /Users/iamacup/Desktop/RNTesting/BP2                                                        

JavaScript
  node               11.1.0       /usr/local/bin/node  
  npm                6.4.1        /usr/local/bin/npm   
  yarn               1.12.3       /usr/local/bin/yarn  

React Native
  react-native-cli   2.0.1       
  app rn version     0.57.5      

Ignite
  ignite             2.1.2        /usr/local/bin/ignite  

Android
  java               1.8.0_152-release   /usr/bin/java                       
  android home       -                   /Users/iamacup/Library/Android/sdk  

iOS
  xcode              10.1 ```
kevinvangelder commented 5 years ago

Thanks for reporting. XCode 10 is only known to work with React Native 0.57.5+. Your best course of action will be to upgrade your app's react native version or downgrade XCode. At this point we are no longer actively developing Andross, so it is unlikely we'll be able to update it to use the latest RN, but we'd be more than happy to consider any pull requests.

iamacup commented 5 years ago

Hey, thanks for the quick update!

Would you be willing to update the main ignite CLI readme.md to reflect your comment? Lots of react-native / redux tutorials point to the repo and having this info up front would be a great help for lots of newcommers :)

Cheers for the great tool!

jamonholmgren commented 5 years ago

That's a good idea @iamacup. We'll do that.

jamonholmgren commented 5 years ago

Fixed by https://github.com/infinitered/ignite-ir-boilerplate-andross/pull/228