Hi,
We do have a method "AddUserInfo" in our latest released version 1.4 to associate custom data to the user. You can use it as follows:
const char* userName = "Nick";
const char* pwd = "*******";
const char* emailId = "nick@shephertz.co.in";
App42Object* app42Object = new App42Object();
app42Object->setObject("name", "John");
app42Object->setObject("age", "20");
const char* dbName = "<Enter_the_dbName>";
const char* collectionName = "<Your_Collection_Name>";
App42API::setDbName(dbName);
userService->AddUserInfo(object, collectionName);
userService->CreateUser(userName, pwd, emailId,this,app42callfuncND_selector(Sample_Class::onUserRequestCompleted));
To fetch the associated data you can use getUser API followed by setQuery method as follows:
const char* userName = "Nick";
const char* key = "name";
const char* value = "John";
Query* query = QueryBuilder::BuildQuery(key, value, APP42_OP_EQUALS);
const char* dbName = "<Enter_the_dbName>";
const char* collectionName = "<Your_Collection_Name>";
userService->setQuery(dbName,collectionName, query);
userService->GetUser(userName, this, app42callfuncND_selector(Sample_Class::onUserRequestCompleted));
We are in the process to update the docs for cocos2dx SDK, that will be done by tomorrow.
Let us know if you face any further problem.
Thanks