sprite kit - userDefaults reset / wiped after iOS 10.3 update -
in spritekit game use userdefaults save high scores etc. works fine, working smoothly.
however - updated devices ios 10.3 (release, not beta) , noticed saved data wiped...
new data preserved - eg - new high score recorded, userdefaults still being set once created.. wouldn't have expected 10.3 wipe old data ??
i imagine new apfs ?
i have not tested in other apps yet - has else seen issue ? idea how prevent happening in future ?
thanks.
example of setting default: (swift 3)
if (userdefaults.standard.value(forkey: "highscorelife") == nil) { highscorelife = 0 userdefaults.standard.set(highscorelife, forkey: "highscorelife") } else { highscorelife = int32(userdefaults.standard.integer(forkey: "highscorelife") int) }
Comments
Post a Comment