This method is only called on your ApplicationDelegate
instance so is this where you put your code?
If you need to be notified of when your application enters background outside of the ApplicationDelegate you can register with NSNotificationCenter
.
[[NSNotificationCenter defaultCenter] addObserver: whatever
selector: @selector(enteredBackground:)
name: UIApplicationDidEnterBackgroundNotification
object: nil];
This will work in any class, but you obviously need to create the method enteredBackground
or whatever you call it :)