Compress PNG Files == NO ignored in Xcode 7.3?

I use PNGLib in my app to load some of the launch image textures after app launch. Since updating to Xcode 7.3 (release, but beta was the same), PNGLib can no longer load these files as they now appear to use the Apple-specific CgBI format.


It seems that Xcode is choosing to 'compress' these textures when it copies them to the resources, despite the fact that 'Compress PNG Files' is set to No in the project's build settings. Up until now, setting this option to 'No' has always worked.


Has anyone else come across this and/or found a workaround in Xcode?

Accepted Reply

Yeah, I have the same problem. I think it is XCode Bug.

SOLUTION: Change the file type in inspector to: Data.

Replies

Yeah, I have the same problem. I think it is XCode Bug.

SOLUTION: Change the file type in inspector to: Data.

Brilliant, although I wish I'd found that out yesterday before I decided to bite the bullet and add CgBI support to my copy of pnglib...!


I'll stick with your solution though - Xcode's pngcrush 'compression' almost doubles the size of my PNG files.

In the build settings, search "Remove Text Metadata From PNG Files" option, and select No.

Anyone sent a bug report on this to Apple?

Is there a way to fix this for PNGs in an xcassets folder? The ability to change type in the inspector only appears to be available for files outside of .xcassets.

I just sent Apple a bug report with rdar://28137406. I've been struggling with this for a couple days.