Automatically having a folder's contents in a project and in the target(s). How?
Automatically having a folder's contents in a project and in the target(s). How?
- Subject: Automatically having a folder's contents in a project and in the target(s). How?
- From: Alex Zavatone <email@hidden>
- Date: Wed, 25 Jun 2014 12:16:38 -0400
I'm interested in having a folder reference in an Xcode project for images, sounds, assets, where the entire contents are always added to the project copied into the resulting application.
If we add (or remove) a bunch of images into this folder, can Xcode automatically update its file list in project.pbxproj?
Should Asset Catalogs be used for to accomplish this goal?
I've tested adding a folder reference into a project, but there are several issues.
For one, all the team members now need to access images differently because of the path that the images are, or we set up a macro to handle this.
Secondly, the folder reference works GREAT when files are added into a folder, the content shows up within the folder reference in the project's Project Navigator instantly. When built (after a clean - why do we have to clean first?), the files show up within that same folder in the executable as desired, but when files are removed from the folder on disk, the contents of the folder ref in the PN do also go away, but after a clean and build, the files that were removed are still in the application's bundle. You'd think that in the build process, if a folder reference is added to the build, that Xcode would be Mac-like and replace the contents that were in that folder if it already exists, or simply nuke the folder in the target and replace it, but that doesn't happen. This means your folder is left containing files you don't want, don't need and you now have to track down what those are. It's another thing to worry about that the build process should handle for you.
Thirdly, the project target only updates the files to be copied into the target after doing a clean. Why? In larger projects, this wastes a little time that I'd like not to waste.
So, in this use case, does Xcode just not do this? Would an Asset Catalog handle this better? I'm pretty surprised about this since we were handling this exact use case in Director at Macromedia back in 1994/1995 for publishing executables and the dreaded Shockwave files back when Macs had Quadra in their name and PCs had turbo switches.
Thanks in advance. I'm simply getting too many cases where we waste time because one of the team members has forgotten to check in new graphics for our projects and a simple "put everything from this folder into the project and the target and make sure that anything removed from that folder is removed from the project and target without having to do a clean and build all the time" would be quite useful.
How's that for a run on sentence?
Cheers,
Alex Zavatone
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden