PlayerPrefs.DeleteAll() on iPhone

Hi,
Anyone else have issues with testing in debug mode and saving deleting prefs on iPhone?
I’ve been testing some high score posting code to FB/Twitter/web and have a “Reset High Scores” button that does a PlayerPrefs.DeleteAll(), which I’ve been using a lot to reset scores and test functions.

Weird thing is sometimes it does not seem to delete them all, and I have key data still hanging around.

?

I also have this problem. I am using player prefs to store my high scores. If I call PlayerPrefs.DeleteAll() within update it will clear my table. When I try and put that functionality onto a button it would only works sometimes. I have also tried deleting the individual keys rather than all at once to no avail.

The only works sometimes bit is the weird thing. I have worked out that if I add an extra line, even a Debug.Log and save the file go back to the game (it’s still running from before) the button will then work once to delete the keys. It won’t work again untill I change something in the button press call again.

I swear this must be a unity bug or something.

ah, so I’m not nutz! Was sending me batty trying to figure this out.
Anyone else?

I realised last night that I was being a bit of a dufus (I’m new to this game!)

So anyway for my high scores I have an array that is set up that has the default scores in it. When the player goes to the high score screen I do a check to see if there is any data in the playerprefs and if not then I fill out the player prefs with the default scores in the array.

Now my problem was that after getting a high score the array would be used to sort the scores. The values from my high score table were also in my array. So I would be deleting the player prefs on the options screen and then going back to the high score screen which would see that the player prefs was empty and get the scores from the array (which weren’t the default scores any more!) so I thought they weren’t being erased.

After realising my error I now just set the default scores directly from the options screen rather than trying to delete them.

hmmm…maybe I’m being a dufus too then! dufus check time!