Asset Catalog

RSS for tag

An asset catalog is a type of file used to organize and manage different assets and image resolutions used by your app’s user interface.

Posts under Asset Catalog tag

38 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Can't compile asset catalog when including iMessage App Icon asset
I'm trying to add an iMessage extension to my app, and upon adding the iMessage App Icon set, I ran into an issue with one specific icon size: 1024x768px, aka 1x 1024x768pt. When I remove this one icon from the icon set, it compiles and runs fine, however I can't push it to the App Store as I get the error: "Asset validation failed. Missing Image Asset. Your app is missing the Large App Icon asset 'AppIcon' in 'Payload/Runner.app/PlugIns/MessagesExtension.appex'." I'm assuming this refers to 1024x768px, as this size placeholder appears upon adding a New Messages Extension Icon to my assets folder, and 1024x1024 is already included and compiles fine with it. However, when I add the 1024x768 icon, and try to run the app, I get the error: "Command CompileAssetCatalog failed with a nonzero exit code" The app icon's filename is correct, it is exactly 1024x768 px, and my contents.json correctly includes : { "filename" : "AppIcon_1024x768.png", "idiom" : "ios-marketing", "platform" : "ios", "scale" : "1x", "size" : "1024x768" } as is the same format for all of my other icons that work. Why am I running into this issue upon inclusion of this one required size? How do I fix it?
1
0
105
3d
Asset validation failed
I'm trying to build an app using flutter which runs fine on both the Android and iOS side locally, but I cannot submit my app to the store. When I try an 'archive' or a 'validation' I keep getting the error: Invalid large app icon. The large app icon in the asset catalog in “Runner.app” can’t be transparent or contain an alpha channel. For details, visit: https://developer.apple.com/design/human-interface-guidelines/app-icons. (ID: 06a51b84-cfc5-43be-94c3-3ae02e5d1229) I've tried: Making sure my dependencies are up-to-date putting remove_alpha_ios: true in flutter_icons Going icon-by-icon and making sure it does not have an "alpha channel" (opening from Finder and exporting without "Alpha channel" checked) Making sure the icon is not rounded Cleaning my build environment (feels like 100s of times now) JPG icons instead of PNG I don't know what else to do. Nothing is working and I've now wasted multiple days on this problem. I'm new to XCode in general and have never run into something like this before, so if you have any suggestions please treat me like I'm new. I've tried reading the logs that appear when I click "show logs" but there's a lot in there and most of what I have checked into doesn't seem helpful. Is it possible I've missed an Icon somewhere? If so, how can I tell which one it was? IS this even an Icon problem? How do I know? Where do I go from here? Is there more information I can provide that will help? If so, what, and where is it located?
0
0
167
6d
Heic format image incompatibility issue
I am a developer working on iOS apps. In the demo, I planned to replace the local images with Heic format instead of PNG format, but the actual test results showed abnormalities on this device, while the other test devices displayed normally Heic images are converted by the built-in image conversion function on Mac. I tested multiple Heic images, but none of them were displayed and the image information returned nil,,but PNG images can be displayed normally. device information:
5
0
269
2w
How do I add alternative app icons for a SwiftUI tvOS app?
I am familiar with providing the main layered app icon for a tvOS project, but I cannot work out how to successfully add support for alternative layered icons in the info.plist and/or asset catalog and/or build settings for a SwiftUI (or Swift) tvOS project. Whenever I check the result of UIApplication.shared.supportsAlternateIcons it returns false I have witnessed other tvOS apps such as Plex successfully switch the app icon, so it must be possible to do. How should the project be configured, what am I missing?
0
0
145
3w
SVG Assets for regular size class are not being picked up by iPads
I’m encountering an issue with image assets when using SVGs in my app. I need to provide different images for regular and compact width size classes. Here’s what I’m doing: 1. Added SVG image assets for dark and light modes 2. Preserve Vector Data is checked. 3. Appearances is set to `Any, Dark` 4. Set the width class to `Any & Regular` and the height class to `Any` However, when I run the app on iPads, it picks up the images for the compact size class instead of the regular size class ones. Any help or suggestions would be greatly appreciated!
1
0
165
3w
Native camera and AVCapture image difference
We are trying to build a simple image capture app using AVFoundation and AVCaptureDevice. Custom settings are used for exposure point and bias. But when image is captured using front camera , the image captured from the app and front native camera does not match. The image captured from the app includes more area than the native app. Also there is difference between the tilt angle between two images. So is there any way to capture image exactly same as native camera using AVFoundation and AVCaptureDevice. Native Custom
0
0
240
Sep ’24
App Icon all black on ios17, works on iOS18, building app in Xcode16 beta
In my app I added an AppIcon in the Assets.xcassets folder. I added a any/dark/tinted version of the app icon, in 1024x1024 resolution as a HEIC file, specifying a "single size" iOS option. When I build and run the app in xcode16 beta on iOS18 the icon works as expected, but when I run the same app on iOS17 the icon just shows up as a black rectangle. How do I get the app icon to work correctly on both iOS18 and iOS17?
1
0
455
Aug ’24
Assets are outrageously large in VisionOS builds
I'm developing an app for Apple Vision Pro. The asset directory in my project is small: $ du -sh Assets.xcassets 292K Assets.xcassets However, after build assets in the resulting bundle are 15MB! $ du -sh MyApp.app/Assets.car 15M MyApp.app/Assets.car That's two orders of magnitude! Considering that binaries of the app are a couple of MBs, the app bundle is basically all assets! WTF?! It seems somewhere in build process several very large assets are generated: > assetutil --info Assets.car | grep "SizeOnDisk" | sed 's/^[[:space:]]*"SizeOnDisk" : //' | sed 's/,$//' | sort -rn | head 2860982 2860982 2859215 2749277 2658939 1049666 163374 163374 136454 79949 The top one has this in the output of assetutil: {{ "MipLevel" : 0, "RenditionName" : "avp_app_icon_frame.png", "SHA1Digest" : "1F511AC99BA7EE4B7735FDC84F64BA1CDCB044734ED7D3A4AEC1F07AEA90B969", "SizeOnDisk" : 2860982, "Texture" : { "AssetType" : "Texture Data", "Compression" : "lzfse", "Encoding" : "ARGB", "PixelHeight" : 1024, "PixelWidth" : 1024, "Rowbytes" : 4096, "Texture Pixel Format" : "R32 Float" } } Full 32bpp basically w/ lz compression?! Why? What's going on? How do I turn this off?
1
0
255
Aug ’24
Setting a custom icon for documents
I'm trying to set custom Icons for my documents created in a Mac Catalyst app. The icon I defined appears on iOS apps fine. But on my mac they all have a generic icon. I have added the CFBundleTypeIcons key to my info.plist and added an .icns file to my app but it changes nothing. What am I not doing here that I should be?
2
0
425
Aug ’24
Launch screen is black when using UIImageView in storyboard
I'm trying to add an SVG image to my launch screen. The SVG image is working fine in the main storyboard also used in a UIImageView, but the launch screen remains completely black; the launch screen is set with white background, so it seems to be completely ignored. When I remove the image from the UIImageView the launch screen is shown with correct background color but of course without the whished image. I can also correctly implement text in the launch screen, the launch screen shows the text and the background color correctly. As soon as I define an image from the asset catalogue for the UIImageView in the launch screen, the launch screen is completely black not showing anything. I tried also with a simple png image-set instead of the SVG image, but still the same issue. How can I implement a SVG image in my launch screen?
2
0
390
Jul ’24
Asset Symbol Generation - color and image accessors for Asset Catalogs
Hey, in Xcode 16's release notes there is this: Asset catalogs now provide an inspector property for enabling system color and image accessors for generated asset symbols, which allows Swift packages to opt-in to generating these accessors. (113704993) What exactly does this mean? Can we make the generated asset symbols public, so that we can share assets between local swift packages in the project? Unfortunately, I don't see this option in the inspector. I only see "Asset Symbols > Extensions On/Off". Not sure what that means, either. Thanks
1
4
512
Sep ’24
App Intent snippet view does't able to fetch color for xcassets.
We have an existing app in which we have implemented AppShortcuts. The snippet view works fine in iOS 17 while in iOS18 beta, it doesn't able to fetch color from xcassets. If we use system colours or UIColor it's working fine. Not working Color("progressColor") Working Color(uiColor: UIColor(named: "progressColor")!) Color.red Color(hex: "3881d3") // Note: We created Color extension to generate color from hex string.
0
4
448
Jun ’24
Public generated asset symbols
Is there currently an option to make generated asset symbols public? If not, would it be possible to set the generated asset symbol so they are public. It's quite common to have an apps design system implemented in a separate framework. Currently the generate assets symbols is useless for this as they can't be access in the framework consumer. It would be great to add it to this new dropdown in Xcode 16 or along side it. (113704993 in the release notes) So the options would be Internal, Public and Off. This should affect the symbols, the extensions and the framework support. (There's a post on the swift forums about this as well here: https://forums.swift.org/t/generate-images-and-colors-inside-a-swift-package/65674)
4
13
1.2k
Sep ’24