Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 8.2.1 Cannot add folder reference

Tags:

xcode

ios

xcode8

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".

folder references

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

red file

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.

blue - red folder

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

identity last step

Someone might know what is happening?

like image 843
Vodenjak Avatar asked Oct 23 '25 14:10

Vodenjak


1 Answers

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!

like image 139
Vodenjak Avatar answered Oct 26 '25 05:10

Vodenjak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!