Hello,
I’m trying to read a .plist file in the jsb version of cocos2d-x js, but I get a empty array back instead. I load the plist with
var test = jsb.fileUtils.getValueMapFromFile(res.ani_plist);
I’ve tried this on xcode with the simulator and on a device with the same result. When debugging I see that in CCFileUtilsApple.mm the dictionary in
ValueMap FileUtilsApple::getValueMapFromFile(const std::string& filename)
gets the correct values from the plist. The dictionary is then converted into a valueMap and send back to js. In the debugger I can’t see if this valueMap is correctly filled, so either the valueMap gets filled incorrectly or something goes wrong when the sending the valueMap back to js. Either way, when using the remote debugger in firefox I see that a empty array is returned.
The plist itself has a correct syntax, it gets accepted when loading the plist and png into the spriteframeCache and the sprite frames are correctly saved in the cache as well. The plist was created in texture packer.
I’ve created a test project to demonstrate this behaviour. In the test project, press the button and look in the log.
You can download it here.
My environment is
cocos2d-x js 3.6
Xcode 6.3.2
OS X 10.10.2
Texture packer 3.7.1
I hope that someone can look into this.