-
Notifications
You must be signed in to change notification settings - Fork 764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R.swift doesn't work with Folders in Xcode 16 #914
Comments
I just finished converting a huge project to folders, only to find out that RSwift is not compatible as is 😫 You have to set Here is what I did : "$SRCROOT/scripts/rswift" generate \
--input-type input-files \
--input-files $SRCROOT/Resources/Assets.xcassets \
$(find $SRCROOT/Resources/Fonts -name '*.ttf' -exec echo --input-files {} \;) \
$(find $SRCROOT/Resources/Fonts -name '*.otf' -exec echo --input-files {} \;) \
$(find $SRCROOT/Resources/Strings -name '*.strings' -exec echo --input-files {} \;) \
$(find $SRCROOT/Resources/Strings -name '*.stringsdict' -exec echo --input-files {} \;) \
$(find $SRCROOT/Resources/Files -name '*.json' -exec echo --input-files {} \;) \
$(find $SRCROOT/ -name '*.storyboard' -exec echo --input-files {} \;) \
$(find $SRCROOT/ -name '*.xib' -exec echo --input-files {} \;) \
--target YOUR_TARGET \
"$SRCROOT/R.generated.swift" I don't know if target is necessary though |
Indeed The default mode for Xcode build tool plug-ins is Your solution is a good workaround in the meantime. The target isn't needed. |
As far as I understand, this problem was fixed in the latest version of swiftlint?! |
I opened an PR about this error. Also I needed to update XcodeEdit project. |
Xcode 16 default project structure uses Folders instead of Groups.
R.swift ignores Folders, which means resources in them aren't added to
R.*
.As a workaround, you can convert Folders back into Groups, this makes it work with R.swift.
Long term, R.swift should add support for scanning Folders.
The text was updated successfully, but these errors were encountered: