HKWarnings on iOS6

I’ve noticed a few people running HKWarnings on iOS6 already. Hardcore early-adopters!

Number of iPads running iOS6: 15
Number of non-iPads running iOS6: 23

That’s out of 20,000 users, or so, so not many.

As with all new releases of iOS software there are changes and incompatibilities that may cause issues with your current apps that were built for a previous version of iOS.

We are not yet allowed to talk about the changes in iOS6:

Xcode 4.5 Developer Preview and iOS 6 beta are pre-release software and are considered Apple Confidential Information and are subject to the terms of your iOS Developer ProgramLicense Agreement. Unauthorized distribution or disclosure of Apple Confidential Information is prohibited.

We are also not yet allowed to submit apps built against the iOS6 SDK, so anything that is broken will have to stay broken for the moment.

So far I have only spotted a few issues with HKWarnings running on iOS6:

  1. An occasional startup crash when attempting to get a SecureUDID.
  2. A green background on the typhoon tracks page (see below!)
  3. The screens do not rotate if you hold your device upside-down.
  4. The Settings screen on the iPad version has a brown background, not grey.

For the interested:

  1. SecureUDID uses UIPasteboard. UIPasteboard is not thread-safe, and it seems thread timing has changed in iOS 6 to cause a crash.

  2. The TC Track screen uses a UIWebView to display the typhoon tracks. UIWebView uses WebKit, as does Safari, as does Google Chrome. The HTML I use is very simple:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
    <head>
    <title></title>
    </head>
    <body bgcolor="rgb(59, 59, 59)">
        <!-- insert urls to TC tracks here -->
    </body>
</html>

An example is here: testBG1.html

View that with an iOS device running 5.0 or 5.1 and the background is brown/iron. View it with iOS6, the background is green!

So I fired up Google Chrome, opened the Developer Tools window, loaded my test web page and noticed something called Matched CSS Rules.

No idea what that is, but it’s what’s causing the background to go green. So I figured if I wrote my own CSS for background-color, it might fix it:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
    <head>
    <style type="text/css">
        body{background-color:#3B3B3B;}
    </style>
    <title></title>
    </head>
    <body>
        <!-- insert urls to TC tracks here -->
    </body>
</html>

An example is here: testBG2.html

This new HTML with a bit of CSS produces a brown/iron background on iOS5 and iOS6. So that’s fixed. Maybe I just don’t know my HTML/CSS!

  1. Still under Apple’s NDA, but I haven’t figured it out yet.
  2. Same for this one, something changed with background colours on UITableViews.

So, for the early adopters of iOS6 using HKWarnings, please bear with me whilst I figure the issues out and wait for Apple to allow us to submit fixes.

Thanks.