In Xcode 4, I can't add files/resources to my project without having the Relative-to-Group path end up something like: ../../workspace/Project/Resources/thing.png
Ideally I would have Resources/thing.png
.
I have tried every possible combination of adding folders, files, making new groups. I wish to keep my resources in a folder within my project directory. If I omit the folder, clearly my assets will be relative to the project — just "thing.png" under the project's root.
Is there any way to change the path of a single file (I already know how to 'change the location the group represents') such that I can set the location manually (such as in Xcode 3, where this path crap would happen as well).
Clicking on the Folder icon next to the name will bring up an open panel from which you can choose the correct location of the file.
Xcode offers several ways to add existing files and folders to your project: Drag the files from the Finder into the Project navigator. Click the Add button (+) in the Project navigator's filter bar, and choose Add Files to “projectName”. Choose File > Add Files to “projectName”.
A relative path refers to a location that is relative to a current directory. Relative paths make use of two special symbols, a dot (.) and a double-dot (..), which translate into the current directory and the parent directory. Double dots are used for moving up in the hierarchy.
Find your ViewControllers in the file system. Before clicking Add make sure that the option Create groups is selected. Click Add.
My dirty, but simple solution to this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With