Glob for Resources
to hide warning "No files found at:"
#6032
Unanswered
VorkhlikArtem
asked this question in
Troubleshooting & how to
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Developers often keep resources files (like xibs and storyboard) not in a separate folder Resources/ but near with their corresponding source files (.swift). Example of such issue: #5552
So, they have to add a certain glob for resources property in tuist manifests:
resources: [ "MyTarget/Sources/**/*.xib", "MyTarget/Sources/**/*.storyboard", "MyTarget/Sources/**/*.xcassets", ]
or
resources: [ "MyTarget/Sources/**/*.{xib,storyboard,xcassets}" ]
Problem of such method:
You have to add new extensions to this glob if you create new resources extensions for a target. It may be a lot of resource extensions
If you write all extension straightaway in this glob you will get such warning:
No files found at: /Users/...../MY_PROJECT/MyTarget/Sources/**/*.{xcassets,strings,ttf,js,xib,storyboard}
Solution:
Instead of adding resource extensions just on the contrary exclude sources and headers extensions (and some other supporting file extensions) in excluding array. For example, here I exclude .swift, .m, headers and explicitly Info.plist :
You can create a public variable in ProjectDescriptionHelpers:
public let excludingForResources: [Path] = [ "**/{*.{swift,m,h,pch},Info.plist}" ]
and use it in all your manifests:
Beta Was this translation helpful? Give feedback.
All reactions