0

I need a way for my app to know if the home button is pressed, while the app is running in the background. If the home button is pressed, something is gonna be added to a list inside the app. Is that possible somehow?

Kara
  • 6,115
  • 16
  • 50
  • 57

1 Answers1

0

If your app is in the background, your app wont receive any updates. Furthermore, there isn't any way to hook into the home button click even if your app is in the foreground.

Perhaps there is a private api way to handle this, but your app certainly won't be able to both achieve this goal and be in the Apple App Store. Sorry!

In case you wanted some idea why Apple doesn't allow this, it's because they don't want the home button switch's default behavior to be altered. See this:

10.5 Apps that alter the functions of standard switches, such as the Volume Up/Down and Ring/Silent switches, will be rejected

Mr. T
  • 12,795
  • 5
  • 39
  • 47