XCode 8.2.1 Cannot add folder reference

主宰稳场 提交于 2019-12-10 18:05:00

问题


My XCode 8.2.1 doesn't let me add a folder reference.

What I have tried:

I make a right click on the folder called "Unity", then I click on "Add files to Project...", under options I check "Create folder references".

My folder is added as a red file instead of a blue folder how it would be normally.

I tried changing the 'type' of the file to 'folder' under "Identity and Type", then it becomes a light blue folder, but there are no files inside and I can't seem to put them inside in any way, and the name is still red.

Then I manually choose location and the red is gone however there is still nothing in the folder.

Someone might know what is happening?


回答1:


Once again proved the bugginess of XCode, so what solved the above described problem was one (or more) of these things:

  1. restart Mac
  2. open project
  3. clean, clean build folder, delete derived data
  4. try to add wanted folder again
  5. close the project
  6. reopen project and the wanted folder is drawn and painted as it should be, also containing all the files necessary

After a brief happiness, when I tried to build again I got a pbxcp error - "Data" - No such file or directory. Then I did:

  1. Open project settings
  2. Choose Build phases
  3. Remove the wanted folder from Copy Bundle Resources
  4. Click on the wanted folder in the project navigator
  5. Under "Identity and type" choose "Absolute path"
  6. Click on the little folder icon and choose the location
  7. Go back to Copy Bundle Resources and add again your wanted folder
  8. Compile

Good luck!



来源:https://stackoverflow.com/questions/41699971/xcode-8-2-1-cannot-add-folder-reference

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!