Progress lost when updating app

Updating an app through Google Play or App Store erases all of my players’ previous progress. Can this be prevented? I’ve seen other topics on the matter but never a working answer.
Checkbox Use ExternalFilesDir for UE4Game files ? is enabled but doesn’t seem to do anything.


https://forums.unrealengine.com/t/pack-a-game-for-android-without-installing-android-studio-update-android-12/492029

Thanks for the answer, I’m currently trying to apply your method although I’m using a Mac computer so I’m not sure if I’ll be able to follow all the steps.

Also, does this method work for iOS apps too?

1 Like

virtual FString GetSaveGamePath(const TCHAR* Name)
{
#if PLATFORM_ANDROID
// ProjectSettings->Platforms->Android->APKPackaging->AndroidPackageName()
FString BundleID = FString(FPlatformProcess::GetGameBundleId());
// ProjectSettings->Description->ProjectName()
FString AppName = FString(FApp::GetProjectName());
return FString::Printf(TEXT("/storage/emulated/0/Android/data/%s/files/UE4Game/%s/%s/Saved/SaveGames/%s.sav"), *BundleID,
*AppName, *AppName, Name);
#else
return FString::Printf(TEXT("%sSaveGames/%s.sav"), *FPaths::ProjectSavedDir(), Name);
#endif
}

Well, like for Android, it definitely works(my screenshot) … and for the ios and android he wrote discord (this screenshot)

P.S i not work in ios, so I can’t test this code

Hi, thanks for taking the time to answer, it’s very kind of you.

Yesterday I followed the steps on the thread you shared, installing command line tools and the latest SDK and NDK versions but I don’t know how to specify the folders in the engine because I can’t find them on Mac.

Also, I can’t understand what I have to do with that code, I’ve only worked with blueprint so far. I’ll do some research and see if I can figure something out.

Thanks again!