NSUserDefaults synchronize not saving on

前端 未结 2 1177
故里飘歌
故里飘歌 2020-12-16 01:41

I have a bug submitted by a tester that if he performs an action and then reboots his phone (by pressing the home and Sleep/Wake button down for a few seconds) the app is no

2条回答
  •  有刺的猬
    2020-12-16 02:30

    i had gone through the same problem and i identify that i had two reference of [NSUserDefaults standardUserDefaults] object on different classes because nsdefault is a singleton class soo the one called it earlier will have it if u might had already reference of [NSUserDefaults standardUserDefaults] try to finish it from the first reference and let the instance to be free from there and then call the instance at your other class and synchronize hopefully will be done

提交回复
热议问题