☂️ Supporting Xcode 10 and the new Xcode build system
See original GitHub issueFor Discussion
This task tracks issues with Xcode 10 as well as the new Xcode build system. This modern build system was originally introduced in Xcode 9, and it is now used by default in Xcode 10.
Troubleshooting
Please take a look at the list of known issues below. If your issue does not match any of these, please try the following:
- Clean up your project.
- Remove any build artifacts.
- Re-build the app.
If that does not work, please do the following to help us keep track of any remaining issues that need to be solved:
- File a new issue.
- Add a link back to this issue, https://github.com/facebook/react-native/issues/19573
A maintainer will then update this post with a reference to your issue as needed.
Known Issues
- #20774 - When new Xcode build system is used, Xcode build fails to download third-party dependencies (workaround in the issue description)
Fixed Issues
-
#16881 - Xcode signing issues due to Facebook Team ID being used by default in npm release
-
#19569 - Xcode 10 libfishhook.a cannot be found
-
#19774 - glog (config.h missing) and gflags/gflags.h
-
#19781 - wrong iOS simulator is used in Xcode 10
-
#19839 - third-party encounters a semantic issue during Xcode builds to physical iOS device
-
#21137 - Unable to open dependencies file when archiving a project
-
#20492 - ‘Multiple commands produce’ error when building with new Xcode build system
Opting out of the new Xcode build system
For issues related to the new Xcode build system, you may be able to unblock yourself by switching to the legacy build system.
Using Xcode:
- Go to File, then Project Settings or Workspace Settings.
- Select Legacy Build System from the Build System dropdown.
Using xcodebuild
:
You may use the -UseModernBuildSystem=NO
flag to opt out of the new Xcode build system.
Mitigating issues in future Xcode updates
Currently, our CI runs tests on the latest stable Xcode release. We could have caught many of these issues by doing two things:
- Opting into the new build system in CI
- Using the Xcode 10.0 beta in CI when it was introduced this summer
PRs that add support for either of these are welcome. For the latter, we’d look for Xcode 11 beta support once it’s presumably announced next summer.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:31
- Comments:20 (12 by maintainers)
@hramos please take a look at ~#19772~ #19774, I’ve experienced that on a fresh RN project on two different machines on macOS Mojave.
@LeoNatan the issue is intentionally ambiguous, and should cover support by the new build system even though it’s available in Xcode 9 as well. In general, we want people, come September, to be able to install Xcode 10 and continue working on their projects without being held back by some incompatibility on our side. Ideally, we’d address any issues ASAP as people have already been working on iOS 12 updates using Xcode 10 for a month now.