Hello,
My game saves some game data like code below:
void XXX::createIndexFile() {
CCFileUtils *sharedFileUtils = CCFileUtils::sharedFileUtils();
std::string writablePath = sharedFileUtils->getWriteablePath();
std::string fileName = writablePath*“revealedIndex.dat”;
char dataChar[255];
FILE* fp = fopen, “w”);
for ; iter != _revealIndexArray.end; iter*+) {
int i = (int)*iter;
sprintf(dataChar, “%d\n”, i);
fwrite(dataChar, sizeof(char), strlen(dataChar), fp);
}
fclose(fp);
}
It works fine when I play this game. But this can be deleted or cleared by users using ‘Clear cache’ on App Info option of device.
Is there any way to block ‘Clear cache’ or to save file other ways?
Please give some hints or help to solve this issue~
Thanks,