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.

Asset Catalog Documentation

Posts under Asset Catalog tag

42 Posts
Sort by:
Post not yet marked as solved
0 Replies
551 Views
My app uses various PNG images for parts of its UI. In Sonoma these images are rendered all blurred. It looks like I'm putting a 10 or 20px gaussian blur on it, which of course I am not. In prior macOS versions they have rendered just fine. Occasionally some user action in the app will cause a part of one or two images to render sharply, but then it quickly reverts to the blur. I have added the PNGs to the app as image set assets, providing 1x and 2x versions for light and dark modes respectively (so four images each). I'm loading them using NSImage(named: ), and in most cases putting them into an NSImageView. I also use one of them as a patternImage: if let image = NSImage(named: "RackFrame") { let color = NSColor.init(patternImage: image) color.setFill() dirtyRect.fill() } Both methods result in the same issue. Any thoughts on what's going on would be gratefully received!
Posted Last updated
.
Post not yet marked as solved
0 Replies
682 Views
The Assets.car file in Archive and thus in exported .ipa file has significantly increased when archived in Xcode 15 compared to Xcode 14.3.1. For example, the Assets.car file size in the archive made in Xcode 14.3.1 is 125 MB, but in the archive made in Xcode 15 from completely the same project size is 200 MB. Assets have many images as PNG and PDF. What has changed in Xcode 15 for building Assets.car file and how the size can be reduced? Use SVG instead of PDF (and PNG?)? Thanks
Posted
by smartwolf.
Last updated
.
Post marked as solved
1 Replies
829 Views
I recently was thinking about which is the best format to use for my little icons in the app, and was considering the performance of PNG versus SVG . I know that PNG decoders are hardware accelerated and parallelized, and the rendering is as simple as placing the pixels on the screen. On the other hand, SVG requires computation to determine the placement of pixels based on mathematical equations. Considering this, my current assumption is that PNG is faster to render than SVG. However, if SVG is also hardware-accelerated, it could alter the situation, although this may not be the case.
Posted
by iostafi.
Last updated
.
Post not yet marked as solved
1 Replies
501 Views
Are sub-folders and their content supposed to be excluded from the release archive? Our CI is failing due to the IncludedFile having a dependency on the ExcludedFile from the screenshot. If we move it out of the Subfolder, the archive succeeds. Xcode Version 14.3.1
Posted Last updated
.
Post not yet marked as solved
5 Replies
3k Views
I've searched and searched for the past 2 days and I can't seem to solve this at all, there seems to be a lot of different advice for different versions of Xcode, but nothing I try can get past this. I can't publish my ipa because of this. I have an app which has a Asset Catalog (Media.xcassets) which has an icon set called AppIcon - which I've generated a few times, directly in the UI of Xcode and Visual Studio. I've added all images to the ios section and the mac section within the asset catalog - choosing All Sizes (and not Single Size) and can see them referenced all nicely in the json file - there are no warning symbols against any of my icons to indicate they are the wrong size. None of the symbols have any alpha channel set against them, they are all pngs. I've even tried with a completely black image. I have this referenced in my info.plist (that refers to icons), and XSAppIconAssets is at the top: I have the Primary App Icon Set Name referenced in Asset Catalog Compiler - Options correctly and App Icons and Launch Screen options are as follows: If I remove some references to my images in the Asset Catalog - I get specific errors on them and when I add them back in, the errors disappear, so I know the Asset Catalog is referenced OK - I just can't seem to get rid of this obnoxious Missing App Icon error on the 1024x1024 one though Any help would be greatly appreciated, this is doing my head in!
Posted
by j_m_a_n.
Last updated
.
Post not yet marked as solved
1 Replies
677 Views
I'm trying to modify a ShieldConfigurationExtension, but am having trouble adding an icon. I have tried directly adding a png to the ShieldConfiguration extension folder and creating a UIImage from it, but it doesn't seem to work. Am I working with images within an extension properly? This code displays the default configuration override func configuration(shielding application: Application, in category: ActivityCategory) -> ShieldConfiguration { // Customize the shield as needed for applications shielded because of their category. let image = UIImage(named: "icon") return ShieldConfiguration( icon: image) } This code properly displays a customized configuration return ShieldConfiguration( title: ShieldConfiguration.Label(text: "test", color: .white))
Posted
by Larryx01.
Last updated
.
Post not yet marked as solved
1 Replies
660 Views
I am blind, use Voiceover, and am having a difficult time adding an app icon to my project. I created the project with Cordova and can't figure out how to add the icon through the CLI interface, but also can't get it to add through Xcode. Help for either method would be greatly appreciated. Thanks
Posted Last updated
.
Post not yet marked as solved
1 Replies
1.1k Views
I am rendering a png image with an alpha channel from XCAssets in a UIImageView. The rendering occurs as it should in iOS 16 / Xcode 14, but the image is distorted in iOS 17 beta / Xcode 15 beta. I am not sure why, but the distortion is very apparent. I have attached below the original PNG, as well a screenshot comparing the incorrect iOS 17 / Xcode 15 beta behavior vs the iOS 16 / Xcode 14 desired behavior. Comparision: Original image:
Posted
by twodev.
Last updated
.
Post not yet marked as solved
1 Replies
1.1k Views
Hello everyone, I'm facing an issue with my SwiftUI project, and I would appreciate some help in resolving it. The problem is that one of the images in my project is not visible when I use it in my code. Here are the details of the issue: I have for example two images, "AIOx2.png" and "AIOx3.png", both of which are placed in the "Assets.xcassets" folder of my Xcode project. When I use "AIOx3.png" in my SwiftUI code (e.g., replacing Image("AIOx2") with Image("AIOx3")), the image is visible on the preview canvas and simulator. However, when I use "AIOx2.png" in the same way, the image is not visible on the preview canvas or the simulator. I have verified that the file "AIOx2.png" is correctly named and is in the same location as "AIOx3.png" in the "Assets.xcassets" folder. There are no error messages or warnings related to the image in the Xcode console. I have tried several troubleshooting steps, such as cleaning and build, restarting Xcode, re-downloading and re-adding the image to the project, but the issue persists. Is there anything specific that I might be missing or any other suggestions for troubleshooting this problem? I would be grateful for any guidance or insights into resolving this issue. Thank you in advance for your help! Best regards, Adam
Posted
by adamfz.
Last updated
.
Post not yet marked as solved
0 Replies
665 Views
Hi, I'm considering trying the product page optimization with other app icons. The doc says that " If an app is downloaded from a product page with a test treatment, the test treatment app icon displays throughout the download process and on the user’s device." (https://developer.apple.com/help/app-store-connect/create-product-page-optimization-tests/configure-test-treatments). Do I understand correctly that no additional code is required when the app is downloaded from the test treatment ? No code required on app launch ? I appreciate any feedbacks, Thank you
Posted
by Sen_Aika.
Last updated
.
Post not yet marked as solved
0 Replies
828 Views
I keep getting this error and I'm stuck for days. Any advice I cannot figure this out Asset validation failed Missing Info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key.
Posted
by tbutler12.
Last updated
.
Post not yet marked as solved
0 Replies
734 Views
Hi, I have some SVG assets that are natively in 512x512 resolution. I want to use 20 of them in a Widget context where memory consumption must be kept low (due to 30MB Memory limit in extensions). As in that widget context, the images are display in small size (they are displayed in full size in the app) I would like to load a downsampled version of the images (let say 32x32). Is there any way to achieve that? (perhaps with configuration or traitCollection) I could resize them after having loading them full size but it will nevertheless create a memory peak consumption while resizing all the images... Thanks in advance for the help. PS: I really want to avoid to generate smaller preview images just for that purpose but if I can't find a better solution I could ask the app to generate thumbs for all images at first startup and use these thumbs in the widgets... Clement
Posted
by Clem23.
Last updated
.
Post not yet marked as solved
2 Replies
1.3k Views
Is this a bug or the expected behaviour? var progress = itemProvider.loadFileRepresentation( forTypeIdentifier: id, completionHandler: { [self] (u, error) in //... })  var timer = Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { [self] timer in       print("\(progress?.completedUnitCount)/\(progress?.totalUnitCount)")  } this always prints 100/100
Posted
by dakdroid.
Last updated
.
Post not yet marked as solved
1 Replies
744 Views
I don't know if this is the correct place. Symbols for Asset catalog works fine when you have the Assets file in the same target If you have imported a target with Asset file and you can use that assets with: UImage(resource: .asset) Image(.asset) Does not work. Xcode says: This static property is define on "XAssetFile", and maybe not available in this context. There are way to use new Symbols for Asset catalog from other imported target.
Posted Last updated
.
Post not yet marked as solved
1 Replies
901 Views
My project contains an asset catalog with images that have emojis in their name. When trying to build in Xcode 15.0 beta (15A5160n) and 'Generate Asset Symbols' enabled the compiler crashes. Example error: error: 'ï' is not a valid digit in integer literal static let 0ï¸ â £Flat = ImageResource(name: "0ï¸ â £_flat", bundle: resourceBundle)
Posted Last updated
.
Post not yet marked as solved
0 Replies
1.5k Views
In iOS 16, can not displaying PDF included gradients. PDF displayed normally if used Radial or Linear Gradient. Complex shape gradients are not displayed. The PDF is not displayed inside the iOS-application resources and when open file in iPhone use Files app normally. Attached an example with a regular Diamond gradient, which was created use Figma. iOS 15 displays the example file correctly. You can open file if change file format: Example.json rename to -> Example.pdf. P.S. I can't attached pdf or zip files. Example.json
Posted
by Tvorec.
Last updated
.
Post not yet marked as solved
6 Replies
2.5k Views
Hi all, I recently uploaded my app to the App Store and received the following error message: ITMS-90961: Invalid bundle - The app at '***.app' contains a single-size app icon but has a value of 11.0 for the MinimumOSVersion key in its Info.plist file. Include all app icon sizes to support iOS 11.0 or later, or update the iOS Deployment Target to 12.0 or later to support uploads with a single-size app icon. I have checked my assets and confirmed that the AppIcon is set to "All Sizes" and not "Single Size". Is this an issue with Apple's systems or is there something I am doing wrong? Any help would be greatly appreciated. My Xcode version is 14.3 Thanks in advance.
Posted
by Fan Lison.
Last updated
.
Post not yet marked as solved
0 Replies
553 Views
My app uses SpriteKit and requires the use of SKTextureAtlas for performance. However, it uses user-generated content, which means that atlases don’t initialize using bundled images, but instead have to recreate all sprite sheets, leading to long loading times. Is it possible to save the sprite sheets made from user-generated content to disk so that SKTextureAtlas can load them instead of recreating all sprite sheets upon every initialization? Is there any alternative solution to this problem? For example, is there a way to dump a bunch of images into memory to use as a texture pool and keep them there until deallocated?
Posted
by wmk.
Last updated
.
Post not yet marked as solved
6 Replies
1.2k Views
Hi, Overview: My app's icon uses Display P3 colors. The PNG when opened in Preview seems to have the correct colours, but when added to Asset catalog as App icon, the installed app's app icon doesn't have the correct colors. The Preview app's inspector shows the following: Colour Model: RGB Depth: 16 DPI Height: 72 DPI Width: 72 Orientation: 1 (Normal) Pixel Height: 1,024 Pixel Width: 1,024 Profile Name: Display P3 Steps followed: I have an app icon that uses the Display P3 color profile. In Sketch, I have assigned the P3 Display color profile, exported as PNG. Realised it was using only 8 bits / channel color depth. So opened PNG in Pixelmator and changed color depth to 16 bits / channel and exported the PNG. The PNG when opened in Preview seems to have the correct colours, but when used in I even tried to use Display P3 Gamut in asset catalog and provide the same icon for sRGB and Display P3, yet the installed app's icon's colors don't match Questions: What should I do to correct this problem? Any help would be much appreciated.
Posted
by newwbee.
Last updated
.
Post not yet marked as solved
1 Replies
1.4k Views
we got a crash: means refresh UI on a background thread, bug there is none clue in the crash log。 myapp method doesn't appear in the crash log. Have you ever encountered this problem?What is the solution Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Triggered by Thread: 70 Last Exception Backtrace: 0 CoreFoundation 0x1c83ae248 __exceptionPreprocess + 164 (NSException.m:202) 1 libobjc.A.dylib 0x1c177ba68 objc_exception_throw + 60 (objc-exception.mm:356) 2 CoreAutoLayout 0x1e4888e84 _AssertAutoLayoutOnAllowedThreadsOnly + 328 (NSISEngine.m:0) 3 CoreAutoLayout 0x1e487f9b4 -[NSISEngine _optimizeWithoutRebuilding] + 72 (NSISEngine.m:1709) 4 CoreAutoLayout 0x1e487f8e4 -[NSISEngine optimize] + 96 (NSISEngine.m:1683) 5 CoreAutoLayout 0x1e487f670 -[NSISEngine performPendingChangeNotifications] + 104 (NSISEngine.m:677) 6 UIKitCore 0x1ca538710 -[UIView(Hierarchy) layoutSubviews] + 128 (UIView.m:13091) 7 UIKitCore 0x1ca536cec -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1980 (UIView.m:18550) 8 QuartzCore 0x1c9a134e8 CA::Layer::layout_if_needed(CA::Transaction*) + 500 (CALayer.mm:10223) 9 QuartzCore 0x1c9a26b9c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 148 (CALayer.mm:2516) 10 QuartzCore 0x1c9a38098 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 456 (CAContextInternal.mm:2711) 11 QuartzCore 0x1c9a6f3c4 CA::Transaction::commit() + 652 (CATransactionInternal.mm:431) 12 MediaToolbox 0x1d75d7254 videoQueueRemote_removeHostLayer + 116 (FigVideoQueue_Remote.m:509) 13 MediaToolbox 0x1d75d6250 videoQueueRemote_Invalidate + 348 (FigVideoQueue_Remote.m:463) 14 MediaToolbox 0x1d75d6334 videoQueueRemote_Finalize + 36 (FigVideoQueue_Remote.m:817) 15 CoreMedia 0x1d336a044 FigBaseObjectFinalize + 568 (FigBaseObject.c:402) 16 CoreFoundation 0x1c8422d20 _CFRelease + 316 (CFRuntime.c:2097) 17 MediaToolbox 0x1d75d5b30 FigVideoQueueRemoteCallbackServer_NotificationIsPending + 328 (FigCFUtilitiesFigOnly.h:65) 18 MediaToolbox 0x1d771ed7c figvideoqueuecallback_server + 108 (FigVideoQueue_RemoteCallbackServer.c:162) 19 libdispatch.dylib 0x1cf8482ac dispatch_mig_server + 424 (mach.c:3300) 20 libdispatch.dylib 0x1cf829fdc _dispatch_client_callout + 20 (object.m:560) 21 libdispatch.dylib 0x1cf82d46c _dispatch_continuation_pop + 504 (inline_internal.h:2632) 22 libdispatch.dylib 0x1cf840a58 _dispatch_source_invoke + 1588 (source.c:596) 23 libdispatch.dylib 0x1cf83156c _dispatch_lane_serial_drain + 376 (inline_internal.h:0) 24 libdispatch.dylib 0x1cf8321e0 _dispatch_lane_invoke + 384 (queue.c:3940) 25 libdispatch.dylib 0x1cf83ce10 _dispatch_workloop_worker_thread + 652 (queue.c:6846) 26 libsystem_pthread.dylib 0x214cccdf8 _pthread_wqthread + 288 (pthread.c:2618) 27 libsystem_pthread.dylib 0x214cccb98 start_wqthread + 8 (:-1) here is the full log -------------* 2022-10-27_11-31-58.9050_+0800-1a3771605f5d783facc122cfc90a6fb462574e28.crash thread 0 callback
Posted Last updated
.