Hi,
I’m using Cocos2D-JS v3.9 and I’m trying to load remote images in my game. So I’m doing the following:
cc.loader.loadImg(url, function(err, texture) {
// Do something with the texture if there is one
});
This works on Web and Android, but not on iOS 8.1 (also tried on iOS 9.0, not working).
Actually, the callback is not even called!
I tried
cc.loader.loadImg(url, {isCrossOrigin: true}, function(err, texture) {});
cc.loader.textureCache.addImageAsync(url, function(err, texture) {});
cc.loader.textureCache.addImage(url, function(err, texture) {});
Again, the callback is not called.
- I know about the App Transport Security exceptions
- I tried to get an image from different servers in HTTPS
- I do have network access since I’m calling web APIs through cc.loader.getXMLHttpRequest()
I then tried to ping the image directly using the cc.loader.getXMLHttpRequest(), the request has a status 200 but the responseText is empty!
Does anyone have a guess about what’s happening?
Thanks!