IE 10 and iOS 7 compatibility for v2.2

IE 10 on sample tests gives “Unable to get property loadExtension” of undefined or null references
jsloader.js, line 146

iOS 7, it does not load due to resources issue. It still works on chrome, safari and firefox on desktops. It does not work with Safari or chrome on iPad 3, iOS 7. Is there some migration that has to happen to make it compatible?

Could you please add the “loadExtension:false,” to the cocos2d.js after “frameRate:60,” ?
And try it again.

Which version of the engine you used before update to v2.2?

Thank you for your feedback.
David

It has not been tested on iOS7 devices. We will test it after National Day holidays. Thanks for your feedback.

Setting loadExtension:false does make the sample test come up in IE 10. There’s a slight error SCRIPT5007: Unable to get property ‘extend’ of undefined or null reference : TableViewTestScene.js line 27

Unfortunately we would need extensions due to ccbreader. Our app was made using v2.1.4 from coordinated release along with CocosBuilder v3.0-alpha5

iOS 7 broke with v2.1.4 so we are trying to update to the latest to see if those issues maybe fixed but it did not. I guess that’s easy to understand since it was not tested for it. IE 10 did not work in v2.1.4 also. We are trying to figure out if it’s in our code or the framework issue. Thanks

Thanks Kelvin. Please kindly to notice me if there are any bug in the framework. I will find a iOS7 device to check the framework’s compatibility.

I’m a new user, using VS2012 and IE10 on Windows 8. I had the same error, crash on jsLoader.js. I fixed the issue on my side by changing code in cocos2d.js

window.addEventListener('DOMContentLoaded', function () { .. d.body.appendChild(s); document.ccConfig = c; s.id = 'cocos2d-html5'; //else if single file specified, load singlefile });
and remove the line: **document.ccConfig = c;**and move it before the eventListener…

eg:

`document.ccConfig = c;

window.addEventListener(‘DOMContentLoaded’, function () {

// etc
});`

Indeed, moving ccConfig outside of DOMContentLoaded makes it more stable on IE 10. It appears to be variable order issue with different javascript engines.

On iOS 7, with sample tests and moving to single engine, the following errors show:
[Error] Failed to load resource (BaseTestLayer.js, line 0)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (SchedulerTest.js, line 32)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (ActionsTest.js, line 45)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (TileMapTest.js, line 33)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (TransitionsTest.js, line 186)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (DrawPrimitivesTest.js, line 34)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (ParticleTest.js, line 169)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (ProgressActionsTest.js, line 28)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (LayerTest.js, line 45)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (SpriteTest.js, line 55)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (CocosNodeTest.js, line 35)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (RenderTextureTest.js, line 28)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (ActionManagerTest.js, line 40)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (EaseActionsTest.js, line 45)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (ParallaxTest.js, line 30)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (FontTest.js, line 87)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (LabelTest.js, line 52)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (UnitTest.js, line 33)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (SysTest.js, line 33)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (FileUtilsTest.js, line 33)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (EffectsTest.js, line 33)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (ClippingNodeTest.js, line 35)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (OpenGLTest.js, line 50)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (ArmatureTest.js, line 103)
[Error] ReferenceError: Can’t find variable: BaseTestLayer
global code (ChipmunkTest.js, line 65)
[Log] Cocos2d-html5-v2.2 (Cocos2d-html5-v2.2.min.js, line 23)
[Error] TypeError: ‘undefined’ is not a constructor (evaluating ‘new ActionManagerTestScene()’)
testScene (tests-main.js, line 208)
(anonymous function) (tests-main.js, line 160)
*complete
*updatePercent (Cocos2d-html5-v2.2.min.js, line 1324)
_preload (Cocos2d-html5-v2.2.min.js, line 1321)
(anonymous function) (Cocos2d-html5-v2.2.min.js, line 1323)

the last error line is due to pressing ActionManager Test … refresh the page then it runs with a slight error

[Error] ReferenceError: Can’t find variable: cp
global code (ChipmunkTest.js, line 691)
[Log] Cocos2d-html5-v2.2 (Cocos2d-html5-v2.2.min.js, line 23)

Hi,Kelvin L.
I have tested sample tests with Cocos2d-html5-v2.2.min.js on Ipad3(IOS7/Safari),it work well.
What tool you used to see the errors ?

I’m using a mac with Safari 6.1 and running python -m SimpleHTTPServer 8000. Then using safari in mac to show the console of the browser on iPad.

The configuration is using a single engine:
//engineDir:‘…/…/cocos2d/’,
SingleEngineFile:‘…/…/lib/Cocos2d-html5-v2.2.min.js’,

On ipad, I don’t go to “hello world” first. I go to the sample tests directly. As I’ve noted in the previous post, if there are any cache data or it gets reloaded then it works ok on ipad/safari. The first time always have issues.

We fixed it by doing this

document.ccConfig = c;

window.addEventListener(‘DOMContentLoaded’, function () {

document.ccConfig = c;

putting that line in both places makes it stable for IE 10 and iOS 7.