R.swift: First build always fails using the new build system with Xcode 10 Beta 6
Hi,
Using the new build system (the default setting) with Xcode 10 Beta 6 results in the first build failing. Subsequent builds pass.
Configuration
- Xcode 10 Beta 6
- R.swift added via cocoapods
- R.swift build script as follows
$PODS_ROOT/R.swift/rswift" "generate" "$SRCROOT
Result
error: Build input file cannot be found: '/Project/R.generated.swift'
On a local machine, this is not a problem, as we can build again. However, on a CI environment such as Buddybuild, the build continuously fails as it performs a clean build every time.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (1 by maintainers)
We have solved this by defining R.generated.swift as an output file, as follows:
Lets leave it open for now. At the minimum we should update the documentation to detail how to set the output file.
Also worth investigating; Should the project.pbxproj file (and other files) be listed in the input files?
Is your “Run Script” build phase before the “Compile Sources” phase?
Thanks @superpeteblaze That worked! 😉