I am a beginning programmer but I was wondering how I could keep track of a user's actions. For example, hypothetically, the goal of my application is to keep track of how many times the user presses the home button (or opens the internet, etc). Would it be possible to increment a counter each time the user pressed the home button (even though that would exit my app, and other apps)?
Asked
Active
Viewed 384 times
2 Answers
2
iOS is sandboxed, meaning that you can only keep tack of user actions that are targeted to your running app. Your app can not monitor the home button or the running of other apps such as Safari.

Jeff Wolski
- 6,332
- 6
- 37
- 69
-
Alright. Thank you Jeff. Im pretty sure my idea would not work anyway. – Szwedo Dec 10 '11 at 05:18
1
I can't tell for sure but maybe what your looking for is for your application to run in background which would prevent the home button for closing it. Then i guess the counter logic would be your best shot. You can find here if this idea suites your need.
Hope it helps and good luck for your app.

phadaphunk
- 12,785
- 15
- 73
- 107
-
Also don't forget to mark this question as answered if my answer worked for you :). – phadaphunk Dec 09 '11 at 07:18