The primary hardware button of concern on iOS devices is the Home button. This button immediately moves any app presently running to the background. The
viewWillDisappear:, applicationWillResignActive:, and
applicationDidEnterBackground: methods will all be called. Plan your app so that this action will not cause problems.
Both Android and iOS have a button that puts the device to sleep or reboots it. This action also must be handled. Fortunately, the same methods that put the app in the background for other actions are executed so, typically, no additional programming is required to prepare for this.