mac-cain13 / R.swift

Strong typed, autocompleted resources like images, fonts and segues in Swift projects
MIT License
9.49k stars 763 forks source link

I can't make a build using the RswiftModifyXcodePackages plugin #867

Closed DmitriySportsRu closed 1 week ago

DmitriySportsRu commented 10 months ago

I used P.swift in my project via cocoapods, everything worked fine. Now I need to use spm.

  1. I added the library via spm

    Снимок экрана 2023-11-15 в 21 40 07
  2. Added rswift and RswiftLibrary products

    Снимок экрана 2023-11-15 в 21 40 46
  3. Added RswiftGenerateInternalResources to plugins in Build Phases

    Снимок экрана 2023-11-15 в 21 41 09
  4. Launched the RswiftModifyXcodePackages plugin.

    Снимок экрана 2023-11-15 в 21 42 05
  5. After this I start building the project and I get an error

/Library/Developer/Xcode/DerivedData/Sports-fztfcfietwkstjenyuffwoiganzy/SourcePackages/checkouts/R.swift/Sources/RswiftParsers/ProjectResources.swift:10:8 Could not find module 'RswiftResources' for target 'x86_64-apple-macos'; found: arm64-apple-macos, at: /Library/Developer/Xcode/DerivedData/Sports-fztfcfietwkstjenyuffwoiganzy/Build/Products/Debug/RswiftResources.swiftmodule

Снимок экрана 2023-11-15 в 21 31 32

Version: 7.4.0

What am I doing wrong?

maqiqing commented 9 months ago

Hey, have you solved this problem? I have also encountered this problem

tomlokhorst commented 7 months ago

I'm not sure why this error is showing up, but do you actually need this step? It seems in the latest Xcode versions, R.swift works without this step.