“Show Package Contents” of iPhone build release reveals blank PNGs?

半世苍凉 提交于 2019-12-22 12:43:22

问题


So I successfully completed my first iPhone release build and when I curiously went to "Show Package Contents" of the freshly-baked .app file, I noticed that all the contained PNGs are blank! They are all set to the appropriate resolutions, but when I open them, there's nothing to see but the default Preview.app grey.

I tried opening other .app "package contents" (from OS X apps) to see if their PNGs were visible and sure enough they were. So is this business as usual for an iPhone .app build or did I miss a gotcha?


回答1:


XCode may optimize pngs when building application - those files cannot be viewed in Preview app. See "Compress PNG Files" setting in your target (in Packaging block) - if it is set to YES then that's the case.

P.S. you can revert this optimization using pngcrush tool, see command-line command for that here



来源:https://stackoverflow.com/questions/5116106/show-package-contents-of-iphone-build-release-reveals-blank-pngs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!