Why is iconutil generating chopped up images on retina display? - xcode

I have an .iconset which can be found here. Building a binary with Xcode results in an icon that looks like
Generating a .icns file directly using iconutil results in the same thing. Everything but the full resolution asset look weirdly chopped up on retina screens, but displays fine on non-retina screens. Converting the generated .icns back to an .iconset gives me the chopped up assets instead of the original assets.
Anyone have any idea as to what might be going wrong here?

I figured it out, though I'm not exactly sure what caused it.
I generated the app icon using Gimp. I believe when I first generated the icon I created a 1024x1024 icon and then scaled it down using Preview. I just regenerated all of the assets by scaling and exporting all through Gimp. Now the assets look fine. Presumably some information was lost in Preview's scaling.

I believe you need to put them in an Asset Catalog to get all the resolutions to show up correctly. If you don't migrate them into one you can manually edit your applications .plist file, although there shouldn't be any compelling reason you would need to go that route.
Reference: Mac Developer Library: Asset Catalog Help
Select Targets > Your App > General > App Icons

Related

Missing required icon file - exactly 120x120, 76X76, etc... Attempted solutions but no success

So I've recently redesigned the UI of one of my apps, which I'm looking to update. As a finishing touch, I've also redone the app icon for iPhone and iPad. Like the first time, I used a mac app Asset Catalog Creator and Prepo or websites like MakeAppIcon.com and AppIcon.build, or some other closely related online app to create Homescreen and other icons. Typically, these are successful right off the bat. Unfortunately, after a number of failed attempts, as soon as I try to "validate", I receive several errors regarding missing icons.
I've used the mentioned apps and websites several times in the hopes of some success... no avail. I've tried adding the individual files directly from Sketch, with no luck. I even added each item in my assets in the info.plist and I'm still receiving the same errors. I am unsure how to proceed and would greatly appreciate some assistance.
After a week of frustration, it would seem all I had to do was select my project and under the "genera" tab, look for the "App Icons and Launch Images" section, and select the "App Icons Source" to "Use Asset Catalog." From there, I was able to simply drag and drop the images created from my icon generator and drop them into one of the icon image spots. From here, all you have to worry about is adding any extra images the generator may not have automatically created.

Nativescript - Changing the launch screen

There is a way to change de launch screen without have to change each image one by one?
Like the doc says I used the tool: http://nsimage.brosteins.com/ to change the icon, but to change the splash screen I have to change 20 images, there isn't an easiest way?
The easiest way to do this; is on the community site...
http://nativescript.rocks
Actually the images sub-site specifically.
http://images.nativescript.rocks
It will allow you to post a single image and it will generate all the proper size screens for both android and ios.
The second way to do it is to use the ns command line (tns was renamed to ns in late 2020)
ns resources generate splashes ../SourceImage.png --background "#FFFFFF"
You want to use a source image of at least 1024x1024 as Apple requires this for the main app page image, otherwise you will be missing this size and you won't be able to submit the app to Apple.
Please note: no matter which way you generate your screens; you should always DE-INSTALL the app from your test devices so that it can do a full reinstall so that you do see the new splash screens.
Disclosure:
I'm the developer of http://nativescript.rocks group of sites.
With NativeScript 4.x.x and above the CLI has introudced a command for automatic generation of splash screen for both iOS and Android.
tns resources generate splashes ../myImage.png --background "#FF00FF"
The above will take the myImage.png and create different scaled images and replace them in `splash_screen.xml. It will also produce a background PNG with the desired background color. More about this feature in the official documentation.

Xcode 8 import pdf (vector) intro image assets not working well

I drag pdf intro image assets (universal) and building Xcode.
There is no generated png#2 png#3 . (only Pdf)
I follow this tutorial :
https://icons8.com/articles/how-to-use-vectors-in-xcode-7/
When I start app on the device images are so bad quality...
Xcode 6, 7 working ....
Maybe PDF file needs optimisation ?!
In research I found "size of svg is not important" but in this case it is (I test it).
Not sure if this helps, but from what I was reading about this, Xcode doesn't fully support vector graphics. It sounds like instead of you being able to load a vector image (.pdf) and it scales however necessary. Instead, whatever the default size of your .pdf is, it'll assume that is the 1x size, then scale the pdf to automatically create the 2x and 3x image when it's built. So its not actually scaling the original, just creating a 1x, 2x, and 3x png of the original size of your pdf. From what I'm reading, people are thinking this is done to maintain backwards compatibility. I couldn't find anything that says it has changed in Xcode 8, so I'm assuming it still works the same way.
This question seems to answer it well: How do vector images work in Xcode (i.e. pdf files)?
Hope I was able to help.
Possible hepful support links, I would suggest updating to the latest. xcode 13
xcode 8.1
xcode 8

Getting same color output on iOS Simulator versus Quartz drawing in Mac app

I have a PDF that seems to have some internal color profile attached. If I render this in iPhone simulator the colors come out as they look in Photoshop which apparently can parse this color profile. If I render the same PDF on Mac I get the same colors (less bright, muddy) as in Preview and Pixelmator.
Is there some way how I can achieve the same (correct) rendering result on Mac as I was getting in iPhone simulator?
On iOS Simulator, I used CGColorSpaceCreateDeviceRGB with a kCGImageAlphaPremultipliedFirst bitmap context. I also set rendering intent kCGRenderingIntentPerceptual, though I don't know if this makes any difference.
on Mac I tried the same settings, as well as all the different kinds of color spaces, but I'm never able to achieve the same result us in Simulator.
I also tried the two ICC based approaches mentioned here: http://developer.apple.com/library/mac/#qa/qa1396/_index.html
I'm getting desperate. What is different between iOS simulator which gets the colors right and Mac? I thought iOS doesn't do color correction, but Mac does? Right now I am drawing the individual pages with PDFKit. Is there a difference in PDFKit on Mac versus iOS related to color correction that makes it work properly on iOS Simulator, but fails on Mac?
I also took a JPG that was rendered from this PDF in iOS Simulator, put it into a new PDF in Preview and there preview and my Mac rendering yielded exactly the same colors as the input.
It looks to me like iOS Simulator has a magical ability to use a color profile embedded in this PDF which Preview or Quartz on Mac does not.
Please help!
kind regards
Oliver Drobnik
I don't know exactly how simulator works, but I can assure you that both Preview and iOS have very incorrect handling of certain features of PDF files; especially when it comes to color management, transparency, overprint, advanced compression of images etc...
Two tips:
On Mac, open the PDF file in Adobe Reader (free download from Adobe.com). The color you see in Reader should be very close to the actual truth. If your PDF file contains ICC profiles (for objects in the file or in the output intent, meaning for the whole file) it will be used correctly. On iOS, also look at Adobe Reader - it currently is the best (highest quality) display tool on that platform.
Secondly, if you want to know what the simulator or some other tool can or cannot do, have a look at the test patches from the GWG (http://gwg.org/ghentoutputsuite.phtml). These patches were designed to give very easy to interpret results on whether certain tools or printers can handle specific PDF features.
These two steps should at least tell you what works and where it works. That should make it easier to figure out what you need to correct.
Unfortunately this is a confirmed bug in CGPDF on Mac. It manifests itself if you have CMYK as a transparency color space. iOS ignores this correctly, the Mac messes up the colors.

Why iPad default launch image orientations not working (iOS 5)?

There exists a number of questions (some answered already) that pertain to the launch images. I had no problems using launch images per se. My problem comes when trying to support multiple orientations of the launch image (portrait or landscape for my app).
The problem is this:
When i started my app dev, i used the usual default.png as the launch image.
But now i have 4 different launch images (portrait and landscape, plus their retina versions). However, with these launch imaged named different, Im seeing a black screen for the launch, no matter what orientation the device is in.
I spent a day on this. And i decided to just go with a single default.png (retina portrait) since I realized the launch image only lasts a few seconds and is not very important any way.
Alas, the curiosity is killing me.
Note: the images were named as follows (notice they are lower cased, and they also are placed under /images folder rather than at the project root folder):
default-portrait.png
default-portrait#2x.png
default-landscape.png
default-landscape#2x.png
Question:
what am i doing wrong? like i said, i went thru many online references to this problem. none of them helped for me.
It's because you put them into a sub-folder.
This document states:
All launch images must be PNG files and must reside in the top level
of your app’s bundle directory.
The fact that you are using lowercase filenames looks a bit dodgy too...

Resources