When do you want to handle your reset_achievements_preference
option? The method applicationDidBecomeActive
is called when the application starts and when the application returns from background (is brought to foreground by the user).
If you want to handle reset_achievements_preference
only at application startup, it is possible that the user puts your app into background, then returns to it. In this case applicationDidBecomeActive
is called and it sets reset_achievements_preference
to NO which probably is not what you want.
You can simply move this code to application:didFinishLaunchingWithOptions: method to solve this problem.