Running React Native with XCode 10 Beta 1

Ray Deck
2 min readJun 10, 2018

--

As part of studying the new CoreML technology introduced this week at WWDC, I downloaded XCode 10 and iOS 12 to get to work. You can learn more about the former at my SwiftFest talk later this month!

But getting RN to even start up had a couple of issues for me:

  1. Opening a workspace using react-native xcode (from the react-native-xcode package) caused a crash the first. time. New Solution: Open the workspace in XCode production, wait about 30 seconds, then open it in XCode 10 beta. Something about getting the files to index/settle is the key. Note that you can force the plugin to open with production XCode via react-native xcode -a
  2. Compiles failed on two points. First, the bash file that initializes glog doesn’t seem to work in XCode 10. Second, the RCTWebsockets fails to find its libfishhook.a dependency, because it refuses to look for it in derived data, where it really lives! Solution: I built a RN plugin called react-native-fix-xcode-10 and posted it on GitHub. So to apply, after a failed build in XCode, go back to a terminal and run:
cd /path/to/myproject # Note -this is your project, not the /ios subdir
yarn add rhdeck/react-native-fix-xcode-10
react-native fix-xcode

Then go back to xcode and run your build again. I have found that sometimes the first build catches the glog issue, and a second build surfaces the fishhook issue. So you may have to go over it twice.

However, after an initial good build, future builds — even with native code changes — have worked fine for me, and I get access to all the iOS 12 features with React Native!

Hope this helps some others working their way through early-beta living.

--

--

Ray Deck

CTO Element55. Founder, manager, inventor, investor. Focus on AI, AR and React Native mobile.