DXT1 compressed textures arent sopported on Iphone - ios

I've been trying to make an IOS build on unity but each time I tried I get this message "DXT1 compressed textures are not supported when publishing to iPhone"
I have already change the compression of all my textures to "RGB COMPRESSED PVRTC 4bits" but I still get the same error. based on some answers I found here I have to delete the default checker gray but I have no idea what it is or where I can find it. so if anyone knows please help me...

If you haven't resolved this issue yet then try these solutions.
1- First change all textures from DXT1 to any other compression that is supported for Iphone. Am using RGBA Compressed ASTC.
2- Check all your materials, there will be any material which is using unity built in texture named "Default-Checker-Gray". Just delete this texture from that material and it will resolve your issue. image is also attached below for quick reference.
Default Checker Gray Image
Option 2 resolved my issue and now am able to build xcode project.

Related

Strange glowing effect on PDF image assets in iOS?

I am having an issue where the images are rendered with a strange glowing effect around them, pictured here:
It is tough to see from this close but is extremely noticeable when viewing the app. Also, taking these screenshots into a design program and using the color dropper will prove that there is a glow around these images. Each of these images are PDF files, rendered as a template image so that I can change the tintColor instead of adding more images to my assets folder for each color.
I have read some other articles and questions that says there isn't full support for vector graphics yet (here). However, that is outdated as it specifies iOS 7 as the latest version at the time of writing. Now in iOS 13, I assume there have been changes. Another article I read said to never use vector graphics as they can get messed up when Xcode generates PNGs from the PDFs (here).
Information about the assets in my Images.xcassets:
Render as: Template Image
Resizing: Preserve Vector Data
Scales: Single Scale
I also tried to implement 3 PNGs at different sizes (#1x, #2x, #3x) for each image but got the same effect.
Creating new images with a smaller border size got rid of the glow but obviously, that doesn't fit the design style style that I want in an app. I designed these Icons in Sketch and used a border size of 3, then exported as PDF.
So, as I was writing this question I seemed to have found an answer.
It turns out it had nothing to do with anything in Xcode. The problem lies with Sketch. I redesigned each element in Adobe Illustrator, exported them as PDFs, set the same settings in the assets folder like so:
Render as: Template Image
Resizing: Preserve Vector Data
Scales: Single Scale
Here are the updated screenshots:
I am using:
Sketch (Version 52.5)
Adobe Illustrator (Version 24.2.1)
I don't know why this is an issue, but I hope it can help someone who has this issue down the road. If anyone has any more information on this, please write a comment :).

Xcode blowing up PNG size and ignoring Compress PNG = NO flag?

Currently, my Assets.xcassets folder is ~13MB with all images for my application. However, when I archive my app the Assets.car that results is closer to 33MB. When using iOSAssetExtractor as described here: What contributes to the size of assets in an IOS App and how can I shrink this? the issue appears to be that the PNGs are blowing up in size when they are "compressed" by Xcode. Many PNGs are 2-3x the size they were before going through the archiving process. This is a common problem that is referenced in multiple places.
The usual solution as referenced here: XCode png compression issue and here: https://imageoptim.com/xcode.html appears to be setting "Compress PNG Files" to No in build settings. This skips Xcode's unpacking and recompression of assets to avoid the asset size bloat that can be experienced. However, this doesn't appear to be working currently and might have stopped working in Xcode 7.3. There is a thread on this in the Apple forums here: https://forums.developer.apple.com/thread/43372 . However, the accepted solution appears to be changing the file type in the inspector to data which works for PNGs in a resources folder but does not appear to be an option for PNGs stored in an xcassets folder.
Note: I've also tried setting "Remove Text Metadata from PNG Files" to no as well with no success.
Can anyone recommend a solution for how to fix this issue in the current (7.3) version of Xcode so that my Assets.car file does not end up 2-3x larger than expected?
The specific problem of PNG sizes getting much larger seems to have been an Apple bug which appears to be addressed now. But, the more general problem of shrinking down each PNG to the smallest possible size is something that can still be solved more effectively. If you are interested in reading about a new delivery codec that can squeeze every last byte out of each PNG, then please have a look at this iOS framework.

Xcode + PDF images colors look darker in simulator/device (color space issue)

I know this isn't a new problem and I've done a full day (literally) of research. I use the latest Xcode 6, and I'm trying to use all PDF files as vector art resources. However, when I export these images from Illustrator in sRGB (sRGB IEC61966-2.1) , these images show up noticeably darker than if I used a png file.
Some previous suggested solutions are: setting Illustrator file color profile to "web" and choose color space "RGB", and exporting to pdf with Illustrator converting the color space to "sRGB IEC61996-2.1". The latter worked for me for one of the images... And today when I tried the same thing it didn't work!
So I tried all the other solutions, I retried, restarted, tried using different programs, renaming resources, cleaning the project... Nothing worked! The colors still look darker on screen, and the old PDF icon I made look perfect still!
The PDF looks perfect in any other viewer, including Xcode itself, by the way. It's when Xcode compiles, the images get broken (PNG files are generated, and something is wrong with their colorspace).
This is driving me nuts... Anyone else having this problem?
Depending on the screen, you can tell that the center button is quite a bit lighter than the other two icons. I intersected two just to show how distinguishable it is. But on my MacBook Air, they appear identical. Perhaps this has to do with what people say about Apple taking the compiling machine's color space into account? On my iPhone and MacBook they look very different.
Update If I change my MacBook Air's display -> color profile to sRGB, I can clearly tell the difference now. I'm retrying importing the PDF,and maybe the conversion will be correct. Will update.
I've had tremendous troubles with this. And I finally figured it out.
Apple uses sRGB for iOS. To do this you must save your pdf (convert to) in sRGB. I do this with Illustrator -> new -> profile = "web", color space = "RGB" -> save as PDF -> (in options) convert to sRGB. This is suggested by many others in similar questions' solutions. The next... Is what I found out. A trap, if you will.
CAUTION! When you copy past paths over to the new artboard in RGB, the RGB values may have been changed by Illustrator. This took me ages to figure out... Even though the saving to PDF part was right, Illustrator broke it by changing the values by default, making everything darker and more dull.
Hope this helps!

vector images in xassets have different colors

I'm pulling pdf files into Xcode via images.xassets -> image set -> type: vectors. The PDF looks great, but when I look at the images on the device, the colors are changing slightly. Exporting the PDF as individual PNG files and doing it the old way is working fine.
Has anyone else run into this? The color change is bad enough to revert back to the old way for any non monochromatic image. When exporting to PDF with Illustrator, verified that we're using RGB mode and not anything else
check out the deployment target, it should be 7.0 or above. Because of Vector pdf only supports 7.0 and above.
Check Alpha value. I had this issue in the past and the alpha value caused this problem. If i had saved my images with this colours would have been changed a little.
There is a setting on illustrator when exporting to PDF that was causing my problem. Follow: Xcode generates png form pdf with different colors

PNG Premultiplied Alpha, iOS Simulator vs iPad

I use GLKTextureLoader to load a 32bit PNG (created in GIMP). The GLKTextureInfo returned is showing GLKTextureInfoAlphaStateNonPremultiplied for the alphaState on both the simulator and iPad. Experimenting with glBlendFunc and GLKTextureLoader I can get it work on the iPad or simulator, but not both!
With no options to GLKTextureLoader, and with the following blend func:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
I get on the iOS Simulator (notice the glow on the text is bright)
And on a 4th iPad (notice the glow on the text is dark)
Why the difference? The alphaState is the same. What could it be?
I found the answer on an Apple Discussion.
I have the exact same problem. XCode will convert PNG images so that the header chunk is CgBI (instead of IHDR), and that confuses 3rd party libs like libpng, since a character in Apple's header indicates that the data is in a private format. This operation only takes place for the target device - the simulator is unaffected. There are 4 ways to work around the issue (from easiest to hardest).
1) Rename your images to something else (eg. .ppng), and the XCode packaging tool will ignore your file.
2) According to the following link (http://www.imgtec.com/powervr/insider/sdk/KhronosOpenGLES1xMBX.asp), you need to add the following build settings defintion for each target. IPHONEOPTIMIZEOPTIONS=-skip-PNGs I'm embaressed to say that I still haven't figured out where in XCode project settings to add this.
3) Teach your PNG decoder to handle Apple's CgBI format.
4) Use the Cocoa UIImage classes or the Texture2D.m class.
EDIT: In "Packaging" of "Build Settings" I have found a "Compress PNG Files" option that defaults to "Yes".

Resources