Accidentally removed xcassets file from Xcode project Accidentally removed xcassets file from Xcode project ios ios

Accidentally removed xcassets file from Xcode project


I just did this myself and figured out how to quickly remedy the issue.

  1. Go to the project folder in the Finder. You should find that thefolder Images.xcassets is still there.

  2. Move it to a separate location like to the Desktop or something. Itstill has all of the images and json files.

  3. Jump back to Xcode and create a new asset catalog for images.

    File > New > File... > Resource > Asset Catalog

    Name it Images.

  4. Quit Xcode and return to the Finder.

  5. Copy the folders from within your old Images.xcassets to the newImages.xcassets directory in your project.

  6. Launch Xcode and you're back in business!


If you didn't delete it completely, you can just drag it back in from Finder. (Right click your project and select 'Reveal in Finder' to check)

If it's gone completely you simply go Cmd+N -> Resource and select Asset Catalog. You then re-add your imagages via drag and drop or right-click and 'Add Files to ...' and should be good to go.

Hope that helps.


Had the same problem today with Xcode Beta, I also couldn't create a new assets catalog for some reason.This was on a Watchkit Extension ProjectHere's what I did to solve it:

  1. In finder I copied an existing images.xcassets from another folder in my app to my desktop.
  2. Removed the content of this folder.
  3. Copied a deleted (single) Image Asset from my trash into the folder (on my desktop).
  4. Dragged the entire folder into my project in XCode.

That fixed it and everything went back to normal.