XcodeGen
XcodeGen copied to clipboard
Add a source folder as a group, but with any children folders as a folder
I'm working on a Safari web extension which includes a bunch of files and folders in a Resources directory. I need to bundle all of these files and folders, but without a parent "Resources" folder in my app extension. In Xcode it should look like:
Unfortunately I can't find a straightforward way to do this with XcodeGen. If I hardcode each path I can do it, but the contents of this folder can change over time and I'd prefer to just pick up those changes from the file system.
I currently have them hardcoded like this:
type: app-extension
platform: iOS
sources:
- Sources
- path: Resources/assets
type: file
buildPhase: resources
group: Resources
- path: Resources/background.js
buildPhase: resources
group: Resources
- path: Resources/content.js
buildPhase: resources
group: Resources
- path: Resources/manifest.json
buildPhase: resources
group: Resources
- path: Resources/popup.html
buildPhase: resources
group: Resources
- path: Resources/popup.js
buildPhase: resources
group: Resources
I'd prefer to be able to just specify the Resources path with some configuration to have it treated like this.
Is there already a way to do this, or is this something that can be easily accomodated?
@hiltonc, it could be done by specifying type argument:
- path: SafariExtension/Resources/_locales
type: folder
- path: SafariExtension/Resources/images
type: folder
or
- path: SafariExtension/Resources/_locales
buildPhase: resources
type: file
- path: SafariExtension/Resources/images
buildPhase: resources
type: file
@barbasevich I still have to specify them one-by-one with that.