Is iOS 7 PNG compatibility changed?

I have an application that uses UIWebView , and everything has been (and still is) working fine on iOS 6. On iOS 7, however, the ImageIO: PNG not a PNG file error is sometimes thrown ImageIO: PNG not a PNG file when I try to load certain PNG files (e.g. this one ).

Now, obviously, the PNG files are not corrupted because they work on iOS 6, and sometimes they work even on iOS 7, but sometimes they throw this error. I cannot find any common reason that determines when an error occurs, and I am not doing anything unusual with them that could explain this: my code does not apply to them except loading the page in UIWebView, so it looks like WebView does internally. This, of course, makes binding even more difficult.

I know this is a strange question, such as asking โ€œdid Ford change how the wheels work,โ€ but has Apple changed how it handles PNG in iOS 7? Can anyone think about for this iOS 7 bug?

+4
ios objective-c ios7 png uiwebview
source share
2 answers

A problem with PNG files is caused: someone opened some of them in Photoshop for making changes, and these files did not work under certain conditions. I donโ€™t know exactly what it was with them, under the hood, which made them unacceptable for the application, but when we re-exported them, they worked perfectly. Strange, but decided.

Recommendation for those who read this with a similar problem: re-export your files according to various settings and conditions, if necessary, and see if they start working.

+2
source share

The problem is unlikely to be the PNG itself. If that were so, then every time he failed. Most likely, you are corrupting the data, probably due to the state of the race (since it is intermittent). For example, you can make WebKit calls somewhere other than the main thread. You may have gone with this on iOS 6, but on iOS 7 enough, perhaps it has changed so that the raceโ€™s condition doesnโ€™t work out. If you process these PNGs outside of the UIWebView , you may have a race condition. These are the two main places that I would look.

+5
source share

All Articles