0

Something weird happened and interested in insights.

I created 5 new custom button images in Photoshop and saved them as .png files. Opened my project, navigated to a "buttons" group in the side-bar, and deleted the existing placeholder custom button images. Then did an "Add Files…" to add my new images.

Xcode displayed an error message saying "Multiple errors occurred while copying files". The system Console had an error saying: "2/13/13 8:12:18.027 AM Interface Builder Cocoa Touch Tool[1623]: CFPreferences: user home directory at file://localhost/Users/jack/Library/Application%20Support/iPhone%20Simulator/User/ is unavailable. User domains will be volatile."

The resulting image files in the "buttons" group all showed up red. I tried cleaning, deleting the Derived Data, but wasn't able to get the files recognized through typical means.

What partially worked was to manually copy the files into the project folder, then manually - for each image name in red in the "buttons" folder - click on the location icon (see image below) to explicitly choose the image file I had just copied to the project folder.

However, when I tried to build, I got a bunch of compiler errors with references to the images files not existing to copy into the bundle.

enter image description here

Tony
  • 373
  • 5
  • 18
  • I just ran into a similar problem, but git came to the rescue. `git reset head --hard` (sets the repository back to the last commit. Leave off the `--hard` to preview the changes. Then quit Xcode, check for any of the offending files in the project directory. Remove manually if needed. good to go! – Suz May 14 '14 at 18:46

1 Answers1

0

Eventually I deleted the entire "buttons" group + contents, added a new group "new buttons", then added the image files again, did a clean, build, and had to explicitly drag each image file into the "Copy Bundle Resources" section of the target Build Phases before everything worked. Such a lot of pain but thankfully I'm back in business.

Tony
  • 373
  • 5
  • 18