NSUserDefaults Unreliable in iOS 8

后端 未结 12 713
北荒
北荒 2020-12-07 17:31

I have an app that uses [NSUserDefaults standardUserDefaults] to store session information. Generally, this information is checked on app launch, and updated on app exit. I

12条回答
  •  庸人自扰
    2020-12-07 17:46

    As gnasher729 said, don’t call exit(). There may be an issue with NSUserDefaults in iOS8, but calling exit() simply won’t work.

    You should see David Smith’s comments on NSUserDefaults (https://gist.github.com/anonymous/8950927):

    Terminating an app abnormally (memory pressure kill, crash, stop in Xcode) is like git reset --hard HEAD, and leaving

提交回复
热议问题