is there any wat to add a file without file extension to project target
Hi @dabaddah. Could you give some more information? Are you trying to add it to a specific build phase, or just have it show up in the navigator?
@yonaskolb Heyo, I'm having this same issue.
Our use case is that we're testing some files that are test data that don't have an extension, and we'd like them to be include in the test target. Currently, these files aren't added in, even when specified in sources, and I can't seem to add a glob to get the attached to the test target.
Am I missing something basic here?
Files with no file extension aren't given added to any build phase automatically. You will have to supply the build phase manually, before adding the whole directory as sources.
sources:
- path: Files/file
buildPhase: resources
- Files
You could also use an includes glob if all the files share a certain name.
Let me know how you go.
One other option we have is also adding files with no extension to the resources build phase automatically, but I'm not sure if that's a good default. If someone wants to add a pr adding an option in options for it (something like defaultBuildPhaseForNoFileExtension), I'd be happy to merge
@yonaskolb Perfect, thank you!
I think this would maybe be worth mentioning _explicitly_ in the docs?
i.e.
This manually sets the build phase this file or files in this directory will be added to, otherwise XcodeGen will guess based on the file extension. If no extension is present, the file will be automatically ignored.
Most helpful comment
Files with no file extension aren't given added to any build phase automatically. You will have to supply the build phase manually, before adding the whole directory as sources.
You could also use an
includesglob if all the files share a certain name.Let me know how you go.
One other option we have is also adding files with no extension to the resources build phase automatically, but I'm not sure if that's a good default. If someone wants to add a pr adding an option in
optionsfor it (something likedefaultBuildPhaseForNoFileExtension), I'd be happy to merge