to persist data of type nsdictionary, we can call writeToFile to save it as a plist file in obj-c.
What’s the best way to do it in cocos2d-x. any c++ library?
thanks in advance.
cocos2d-x wrapped CCUserDefault to persist data in xml format, it’s multi-platform.
You can find the sample code in the tests
I find a problem that this class isn’t well documented and can not seen in the doxygen output.
Issue #622 is created for this document job.
but it seems that CCUserDefault can only handle simple data type like int, float, string etc, not dictionary.
I decide to isolate persistence and to use the native implementation in iOS/android…
any suggestion? :0
SQLite may fit your requirement, since it’s integrated in both ios & android sdk.