Is .xcassets resource only for app icons and launch images or for our own image assets also? I do know that we can add our images to the .xcassets file, but is it good practice to do so?
3 Answers
Use of xcassets is the new standard as of Xcode 5 and iOS 7. Import images by clicking on the blue folder called "Images.xcassets" then click on the small "+" plus sign at the bottom of the window that appears. Now choose "Import" to put images in there.
This is also the new location of the icon and launch images instead of the standard target->general location, although this is where you still have the option to not choose "Don't use asset catalogs".
It's really helpful because you'll only see 1 image name instead of duplicate names with extensions like "@2x" and "-568h@2x".

- 2,986
- 1
- 23
- 29
Apple said that the asset catalog editor in Xcode manages your app’s images, grouping together various resolutions of the same asset. When building, Xcode compiles the asset catalog into the most efficient bundle for final distribution.
So basic asset catalog can manage AppIcon and LaunchImage.
But you can also add new images to new folders as below.

- 8,227
- 2
- 35
- 40
-
So, in essence, I can compile all my artwork in a project into a few asset files? – Roshan Oct 19 '13 at 09:17
-
3This answer doesn't seem to actually answer Roshan's question - is it *good practice* to use xcassets for all image assets? (justification would also be helpful!) – Joseph Humfrey Jan 15 '14 at 15:00
-
10@JosephHumfrey Actually justification is provided: "Xcode compiles the asset catalog into the most efficient bundle for final distribution". This is the top reason why you really should bundle your images in XCAsset catalogs, to reduce your app size when downloaded from the app store. – Antonio E. Apr 29 '14 at 10:02
-
2@AntonioE. that is not exactly correct, when I put my already optimized images to xcassets, XCode changes them in the final package and I see that XCode made them twice the size! (it undones the compression!) Putting launch images in the old way (without xcassets) it works well and binary is smaller. – frankish Jun 13 '14 at 13:12
-
@AntonioE. Given the last comment, should we be bundling all assets in asset catalogs? – JVillella Jan 03 '15 at 22:01
late to the party but yes it is the best practice
and also There is one tool : AVXCassets Generator with which you can directly generate XCAssets file for all your icons and images just by one click.

- 215
- 2
- 8