Reputation: 441
We do not want to use exit(0) to make the app close, we do however want to allow the app to go to background programmatically and process away, per users allowing this action. Is there a way to send the app to the background programmatically without exit? Simulating the click of the home button?
Thank in advance!
Upvotes: 0
Views: 2048
Reputation: 125007
Is there a way to send the app to the background programmatically without exit?
No. The user is supposed to be in control of the app -- the app shouldn't move to the background (or exit) of its own accord.
Upvotes: 2
Reputation: 43330
Not possible. Home button clicks run into the private GSEvents
framework. It's exit()
or none unfortunately.
Upvotes: 1