Which version are u using? Because the version I use 2.1.4 works also on android =/
An alternetive way is to look for a json converter, and create json string from dictionary and store the json string in userdefaults, dont know if that is a good way though =/ but it could work.
Im using the old version. Anyway, I have added the new function into the old cocos2d-x im using.
And I got a new problem, I think it couldnt find the plist file to write it to.
I made an empty plist (Dictionary type) file through Xcode and put it in Resource folder for Android.
And I do something like this to write the dictionary to file
But it fails to writetofile. Do you know what could cause the problem? I put the plist file in my Resource root folder with my other asset files/folders.
Can it generate a new plist file or i have to create it first?
Hope you can help me.
Thanks.
FaRHaN
Seppe R wrote:
Which version are u using? Because the version I use 2.1.4 works also on android =/
>
An alternetive way is to look for a json converter, and create json string from dictionary and store the json string in userdefaults, dont know if that is a good way though =/ but it could work.
> https://github.com/430Studio/cocos2d-x-jsonconverter/tree/master/cocos2d-x-jsonconverter
I think you need CCFileUtils::sharedFileUtils()->getWriteablePath() which for ios is the documents directory. and just give it a name, it doesnt need to exist