I had another topic regarding SDKBoxPlay, but since that was resolved, and this is a different problem, I created a new topic. As noted there, I am using Cocos2dx 3.17 and sdkbox iap (126.96.36.199) and sdkboxplay (188.8.131.52)
It seems there may be an issue with fetchGameDataNames(). There is a case where onGameDataNames() returns no files, even when there is. This is a very big problem for us, since we rely on the honesty of onGameDataNames() to tell us whether to save new game data or try to load a previous save.
First, the pseudo-code
1. call fetchGameDataNames() 2. wait for onGameDataNames() - this is the important part. If this returns no files, I assume this is a brand new install 3. if there are no files, go to (6) 4. there are files, start download 5. wait for download, then sync local data 6. save local data to the cloud with saveGameDataBinary - if there was no files previously, this creates a fresh save (default game data)
Here are the repro steps:
Download the game from testflight (first install) Make progress, data is saved to cloud Delete app and re-download App overwrites cloud save data with fresh save (no progress)
Oddly, there was one case where it worked
Download and play game (progress saved to cloud) Close app Open settings > manage icloud > delete app data from cloud Delete app Re-download app Play game, make progress (cloud save) Delete app again Re-download again This time, cloud data seems to be loading and progress is restored - keep in mind, there might be some other reason (timing or whatever), I'm just noting it did work sometimes.
I haven’t seen any problems yet with Android, so it seems to be an iOS specific problem. Please let me know if there are any steps I can take to resolve this problem. I’m currently at home, but I will try to get some more debug information tomorrow.