R.swift: Info plist is not resolved using environment variables, this is causing errors

I installed with CocoaPods.

Then i got warning [R.swift] File could not be parsed as Info Plist from URL: /path/to/project/module_name/ $(SRCROOT)/project_name/my_path/Info.plist on xcode 11.2.1.

However i can use R.swift methods.

Using version

  • Xcode 11.2.1
  • CocoaPods: 1.8.4
  • R.swift (5.1.0)
  • R.swift.Library (5.1.0)

BuildPhase

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 13
  • Comments: 18 (3 by maintainers)

Most upvoted comments

Facing the same issue in Xcode 11.3

Facing the same issue in Xcode 11.3

Second that.

still has the issue on 5.2.0 release, i was able to workaround by adding --generator types in buildphases

cd YourSPM
SDKROOT=macosx
swift run -c release rswift generate --generators image,string,color,file,font,nib,segue,storyboard,reuseIdentifier,entitlements,id "$SRCROOT/R.generated.swift

input files: $TEMP_DIR/rswift-lastrun output files: $SRCROOT/R.generated.swift

p.s: iam using manual installation method

Unfortunately the workaround does not work for me. With a clean build and only the image, string, font and color generators specified the issue still persists.

As a workaround, while this issue persists:

It’s possible to manually configure which generators are run: https://github.com/mac-cain13/R.swift/blob/master/Documentation/Ignoring.md#only-run-specific-generators-exclude-rsomething

By not running the info generator, no warning should be shown.

I submitted a PR to at least remove this warning if you are not running the plist generators. The PR was merged into this project but there hasn’t been a release yet. I’ll ask the maintainers if they can do that.

Facing the same issue in Xcode 11.3

Second that.

Third that.