Accidentally Removed Xcassets File from Xcode Project

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 the
    folder Images.xcassets is still there.

  2. Move it to a separate location like to the Desktop or something. It
    still 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 new
    Images.xcassets directory in your project.

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

I just deleted my Images.xcassets folder from my Xcode project

What I did in the end because I had all the code and the app wasn't vary large is I made a new project and transferred everything. Then I created a git repository for if it happens again.

I accidentally deleted LaunchImage from Xcassets help? How to restore LaunchImage to xcassets

I looked around for a question that *specifically addressed this issue and couldn't find one.

Here's what you do:

  • Right click in the white space under the existing image folders
  • (OR) click on the "+" at the bottom of the area

  • Now select "New Launch Image"

Sample Image

This will bring back the original launch image options with all the many, many new image sizes that Xcode 5 and iOS 7 need.

Like this:

Sample Image

Accidentally deleted .xcodeproj file how to recreate it?

If you haven't committed the deletion of the file, do the following:

  1. Open Terminal
  2. cd /path/to/my/local/repo
  3. git checkout -- myproject.xcodeproj

The folder Images.xcassets doesn't exist

You have probably set your launch images to be extracted from an asset catalog (which is 'images.xcassets' by default). If you don't want to use asset catalogs, go to your application settings and select 'don't use asset catalogs', but, if you do (I recommend you do use asset catalogs for App Icons and Launch Images), click 'create asset catalog'. If that option isn't available, right click on your project, select 'New File', go to 'Resource', and select Asset Catalog.

How to add storyboard back to xcode after accidentally deleted

  1. drag and drop it to Xcode's project navigator
  2. uncheck "Copy items if needed"

Asset Catalog Compiler Error In Xcode

If you dont have an assets in any other place even though Trash then need one 1024x1024 icon of your app to generate all assets also need to do following steps.

If you had accidently deleted the app icons folder from image assets then it will be look like this.

Sample Image

please dont be panic now just clean your project using Cmd+Shift+Alt+K
then it will be seems like this

Now Click on use Asset Catalogue it will show the prompt like this.

Sample Image

Just click on Migrate
Now there is the appIcon is present

Sample Image

Just click on right arrow and right click on the appIcons

Sample Image

Now open it in finder and make the appicon assets using the app named "Icon Set Creator" which is Free on appStore.

Once you generated all icons replace the generated folder will existing one.

Your all assets will be regenerated.



Related Topics



Leave a reply



Submit