development blog
   

2016-04-20
>> iOS 9.x ISSUE - INVESTIGATED AND SOLVED!

I would like to personally thank the people who used the contact me form on the website and being patient while we investigated the issue with our games running on iOS 9.x devices. It seems that not all devices were affected either - my own iPad mini could be updated to iOS 9.3.1 and showed no problems. In the end; mainly retina based devices were affected.

Unfortunately; the computer used to compile the games was sitting so long - the hard drive died and it was a painful mess to recover the source code from old backups scattered across various sources. Thankfully nothing was lost so diagnosing the issue was made a little easier.

In the end; getting the latest Xcode and iOS 9.3 SDK's installed - tweaking a few of the project settings to match (heck, the old code was iOS 4.2 SDK) I was able to start the project up and I received the following error:

    CavemanHD[9687:235437] *** Terminating app due to uncaught exception 
    'NSInternalInconsistencyException', reason: 'Application windows are 
    expected to have a root view controller at the end of application launch' 

Of course; this has not been a problem on earlier versions of iOS - going way back to iOS 2.x; so why did apple decide that now was a time to enforce such a thing? In the end; the solution was quite simple, it seems I was not the only one with this issue.

      // add the the OpenGL view to the window
    -  [ g_window addSubview:g_view ];
    +  [ g_window setRootViewController:g_view_controller ]; 

It seems that Apple isn't smart enough to realize that if there is only one view in the application; then it should be the root view. To make matters worse; the addSubview code was taken from one of the earlier sample applications that was provided with the iOS SDK.

We will do some testing on some devices and from there hopefully submit a new version of our games over the next few days for approval by Apple. Hopefully if all goes to plan (approval) everyone should be able to get back to their Caveman goodness! We defintely wanted to write about this to highlight that this was in fact a fault from Apple - not ourselves.

A colleague of mine suggested it is the low-level bit fiddling we do at times that could have broken the software on some 64 bit devices - most of which are retina. Just to be on the safe side, including two binary versions in the next update (uploading now!!)

DISCLAIMER:
"iPhone" and "iPod Touch" are registered trademarks of Apple, Inc.


Copyright © 2008+, Aaron Ardiri. All rights reserved. Designed for 1024x768 resolution.