Questions tagged [xcasset]

An image asset catalog is an asset management file type and editor in Xcode 5.

Xcode 5 asset catalogs manage images and icons in multiple resolutions. An asset catalog is a new asset management file type and editor in Xcode 5.

You use asset catalogs to store and manage images for different platforms, devices, and scale factors. The catalog presents the image variants required, and provides you with the ability to define slice and stretch points for images that are resized at runtime.

For more information on Xcode Asset Catalogs, refer here.

235 questions
14
votes
6 answers

Can't assign xcassets to the main target on Xcode 11

On Xcode 11 my .xcassets, that don't cause any issue on Xcode 10, cause the compilation to fail with the following message: error: Multiple commands produce…
JMiguel
  • 1,459
  • 1
  • 10
  • 12
13
votes
1 answer

UIImage imageWithXAssets

Assume I have two assets in my project or I may have even more assets under my project. Question 1: I can have multiple assets in one project & that is valid, correct? Question 2: What if I set same name to an image-set in different…
sagarkothari
  • 24,520
  • 50
  • 165
  • 235
11
votes
4 answers

Impossible to load an image in xcassets on bundle

I need to include images in a static library. I created a bundle and inserted in my images, the problem is that it seems to work if I include the images directly in the bundle, but stops working if I put in a xcassets file. I followed many guides…
Serluca
  • 2,102
  • 2
  • 19
  • 31
11
votes
1 answer

How can I load an image from Assets.car (compiled version of xcassets) within an NSBundle?

In a nutshell : How can I load images from a compiled Assets.car within an NSBundle? Full Version: I'm in the process of converting a suite of apps to use CocoaPods. Each app relies on a shared pod called Core. Core includes code files, xib files,…
JRG-Developer
  • 12,454
  • 8
  • 55
  • 81
10
votes
0 answers

Xcode doesn't correctly handle named colors defined outside the Main bundle

The main goal is to create a module (framework) containing the basic UI components to be used into multiple Apps of the same company, but I have some issues with Xcode badly handling Assets (especially Named Colors supporting Dark and Light…
lechuckcaptain
  • 1,032
  • 1
  • 9
  • 25
10
votes
1 answer

XCAssets is not copied to application bundle

I am having a problem with XCAssets. I created a custom XCAssets file with icons inside. I get the image from the file like this: [UIImage imageNamed:@"deniedOverlay"]; So, now the problem. The files aren't copied to the .app file, so I get blank…
David Gölzhäuser
  • 3,525
  • 8
  • 50
  • 98
9
votes
2 answers

How to add GIF images to Assets folder and load them in UIImageView programmatically

I am trying to put my @2x and @3x GIF images into the Assets folder in Xcode. I have tried the following links but it didn't work for me. Link 1 and Link 2. I am currently loading the GIF files by adding them to my project bundle and accessing it…
Amogh Shettigar
  • 275
  • 2
  • 3
  • 18
9
votes
1 answer

iOS: Update launch screen dynamically

I've designed a launch screen using story board. It's supposed to have 3 images. 2 of these are static, where as, i need to update one at run time (after downloading that from server). My understanding is that we can not add code for launch screen…
Fayza Nawaz
  • 2,256
  • 3
  • 26
  • 61
9
votes
2 answers

Add many images to xcodes asset catalog - how to manage naming and 1x,2x,3x for each?

I have an app where I would like to add many images (500+) to xcode's asset catalog. Adding the 1x images was easy, I simply had to drag the first folder. However to add the 2x and 3x images it seems I would need to drag each image in manually, and…
Dr. Zoidberg
  • 93
  • 1
  • 4
9
votes
4 answers

Image resources (xcassets) not displayed correctly on Yosemite in application built on El Capitan using xcode6.4

When I build my application on El Capitan using Xcode6.4 (Xcode7 is no option right now), all images/icons (except the AppIcon) does not show, or looks garbled. Looking at the output from the asset compiler it looks fine, but there are two outputs I…
Trond
  • 211
  • 1
  • 7
8
votes
2 answers

Git not tracking a file from a folder - contents.json from .xcassets

I have checked almost all the questions on SO but nothing has worked for me. The issue that I'm unable commit the Contents.json file of .xcassets whatsoever. Whenever I add new images to .xcassets the source control does list the images but not the…
Adeel Miraj
  • 2,472
  • 3
  • 22
  • 32
8
votes
1 answer

How to get rid of asset catalog compiler warning "app icon is required for apps ... targeting iOS 7.0 ..."

I have a APP targeting only iOS8.1 so i set the AppIcon in Images.xcasset like this ... The icons configuration looks like this: My app does not targeting iOS 7.x and below so i'm wondering how i could get rid of Asset Catalog Compiler Warning: "A…
user3845832
8
votes
2 answers

iOS Xcode 6 LaunchImage The launch image set named "LaunchImage" did not have any applicable content

I deleted my original launchImage image set. Then went to "App Icons and Launch Images" in the project section of Xcode. I de-selected "Launch Image Source" and then reselected it. I get the "Migrate launch images to an asset catalog". I choose an…
noobsmcgoobs
  • 2,716
  • 5
  • 32
  • 52
8
votes
2 answers

xcassets: A XXxXX app icon is required for iPhone apps targeting releases of iOS prior to 7.0

When trying to handle all icons and images using xcassets I get warnings stating that 57x57, 57x57@2x, 72x72 and 72x72@2x icons are needed as I target iOS 5+ devices. The problem is that: The default AppIcon group won't accept those icons. Adding…
Rivera
  • 10,792
  • 3
  • 58
  • 102
7
votes
2 answers

Error trying to add SVG image to xcode assets

I have converted an image from PNG to SVG using the vectorizer.io website. The SVG image looks fine when viewed with the Chrome browser and in GIMP. But when I try to add it to the asset folder in xcode (Version 11.4.1) I get this error ... The SVG…
Melchester
  • 421
  • 3
  • 18
1
2
3
15 16