How do I get the resources folder back in Xcode 4?
The q开发者_运维技巧uestion says it all: where is the group and where is the "physical" folder?
So, to get the Resources group back, do this:
- Right-click on your project icon in the navigation view on the left (blue icon).
- Rename the group to "Resources."
- That's it.
But what if you also want the Resources folder on your disk? Easy:
- Open Finder.
- Navigate to your project folder and create a new folder on the same level of the .xcodeproj directory, named "Resources".
- Back in Xcode, select the Resources group and activate the "Utilities" view (all the way in the top right corner next to the Organizer icon).
- Under the "Location" drop down box you see a small white-ish icon: Click it: A dialog called "Choose a directory this group represents" will come up.
- Choose the Resources folder you created in step 2.
- That's it. Now you can drag resources into the Resources group in Xcode and they will end up in the Resources folder on your disk.
I had the same problem by accidentally deleting the folder in the project.
For my environment (XCode v11), right click on the project in the project navigator and select "Add Files to ...
This will bring up your current project folder (if not, simply navigate to that directory) and then select the Assets.xcassets folder and click Add.
This will bring the assets folder back to your project.
精彩评论