Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Error: "/R.swift/rswift: No such file or directory"

Tags:

swift

Receiving this error:

/Users/brendanwinter/Library/Developer/Xcode/DerivedData/Sidearm-bpmbvflilopwujbzzhkazqidiguc/Build/Intermediates/Sidearm.build/Debug-iphonesimulator/louisville.build/Script-52247AC61D89704E005DF2FA.sh: line 2: /R.swift/rswift: No such file or directory

Screenshot 1

I have tried:

  • Reinstall Pods
  • Updating CocoaPods
  • Clearing DerivedData folder
  • Clean Build
like image 840
bwintz Avatar asked Oct 18 '22 11:10

bwintz


1 Answers

I assume you're using the R.swift code generator (which I'm a collaborator on).

If you're installing it using Cocoapods (installation instructions), make sure you point to the correct directory in your run script:

"$PODS_ROOT/R.swift/rswift" generate "$SRCROOT/R.generated.swift"

Note the $PODS_ROOT here, that usually points to the Pods directory at the root of your project.
If you exclude that from the run script, Xcode won't be able to find the rswift executable.

like image 76
Tom Lokhorst Avatar answered Oct 21 '22 08:10

Tom Lokhorst