Intel XDK App Framework not working correctly in iOS 8 – How to fix!

Hi guys!

I recently started using Intel XDK with Apache Cordova for building cross-platform apps.

I have to say that it is pretty awesome: i love it.

Unfortunately I found a little “bug” in the App Framework: the framework that looks like native OS… if you use your app in iOS7, it gives you the right style, but iOS8 (and  9!!) is stylized as <=iOS6.

I discovered this being caused by a variable assigned as something like

var ios7 == (userAgent.indexOf(‘7’)>-1) ? true : false;

So it is obvious why it doesn’t work! But here is how to fix it:

go to www/app_framework/2.1/appframework.css

remove the line

$.os.ios7 = ($.os.ipad||$.os.iphone)&&(userAgent.match(/7_/)) ? true : false;

and write this

$.os.ios7 = ($.os.ipad||$.os.iphone)&&(userAgent.match(/7_/)||userAgent.match(/8_/)||userAgent.match(/9_/)) ? true : false;

Now App Framework is working with iOS8 and iOS9 (which will be released pretty soon).

 

Bye!

Leave a Reply

Your email address will not be published. Required fields are marked *