Requiring iOS6 for HKWarnings

I’d like to require iOS 6 in the next release of HKWarnings. Supporting multiple OS versions, and now all of Apple’s new devices has meant writing quite a bit of code I could get rid of if I went iOS 6 only.

  • 64% of HKWarnings users have upgraded to iOS 6 already
  • 31% have devices that could run iOS6 but they haven’t upgraded yet (maybe something to do with the awful maps!)

Pros

  • Makes testing easier – should result in fewer bugs
  • Removal of all the “Refuctoring” code that’s crept in trying to support iOS 4/5/6
  • I’ll be able to use some of the iOS 6 only features

Cons

  • The first generation iPad cannot run iOS 6, so those users couldn’t upgrade. That’s around 2% of my users.

I think the numbers are high enough and the pros outweigh the cons.

 

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!

3. Still under Apple’s NDA, but I haven’t figured it out yet.
4. 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.