I am having the exact same issue as OP (for Android at least). One of my test devices persists the playerprefs on uninstall/reinstall (Samsung S7), all other devices do not do this.
Hello, you’ve said that it seems to be be fixed with a restart of those devices. Does it mean that once you restart the device, the issue is not reproducible on it in any way?
You might want to hold on the bug submission. I’m sure it won’t happen with Unity 5.5 anyway (once it’s released). I’m still curious if restarting the device fully solves the issue.
JuliusM, yes it appears that the issue did go away after a reboot of the device when I deployed from my local machine.
However I have launched my game and seen this happen on a apk from the play store. In that case it was not enough to restart the device, the issue persisted.
Well, this happens because on the first start of the new app we copy data from internal path to external. This was done to avoid regressions when we’ve started to return external path instead of internal on devices with KitKat and newer Android versions.
You could solve this issue by clearing the internal persistent data path when your app is started. You can get the path like this:
DarkBloodStudios, I’ve just tried to reproduce this with the Nexus 5X device, with steps provided in the original post, but the issue did not happen for me. Could you submit a bug report and provide a minimal project as well as detailed reproduction steps? Please specify which Unity version do you use when you install the app for the first time and which Unity version do you use when you reinstall the app? When you’ll submit the bug, please paste the case number (it’s 6 numbers) here as well.
I was having this error with 5.4.1 version and after i saw this thread i have updated Unity to 5.5.0.f3. I have deleted the application from my device and built again.
And i can confirm this problem persists.
Still the playerprefs are getting persisted between reinstalls. @JuliusM
I dont think it is a device problem by the way. One of the device is S7 Edge and other one is Samsung J1 Ace (5.1.1)
I have seen this before, where the data is getting pushed to the cloud automatically via the OS and persists there.
You may want to check that your data isn’t being sync’d to w/e cloud service is used by the device.
Hi, we are having the same issue only on this two devices: Samsung S6 and S7, both with Android 7.0. We are using Unity 5.5.2f1. As additional info, this happens only when we export the app from Unity Pro, the issue doesn’t appear if it is exported from the Personal Edition.
Although it is not directly related to this post, i would like to mention that we were having issues with the persistentDataPath, due to it returned different paths everytime, sometimes the external, other times the internal path, so we had to use reflexion instead, to point to the internal path (the same code you are using here), where we are currently saving all the data.
Folks, I didn’t see a bug report so far. Sorry we can’t fix anything without knowing what’s wrong. Can someone please report a bug and attach the project? Thanks!
This is still happening in 2017.2.0p2 on Android / Google Pixel. Doesn’t seem to matter how many times I uninstall/reinstall it it’s always pulling in the same, ancient copy of a player prefs string. Uninstalling and restarting the device also doesn’t fix this.
Have submitted a bug report with my project, case 991544.