Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to 'self-destruct' an application from within itself?

I want the ability to uninstall an application from within itself. Example: UIAlertView pops up and says "This Application has Expired." The user hits 'Ok' and then the application proceeds to shut down and remove itself from the device. Is there any way to do this?

like image 972
Groppe Avatar asked Jan 18 '26 20:01

Groppe


2 Answers

I don't think there is a way to remove the app from phone itself. But, you can terminate the execution of an app from code using,

exit(0);

And this is also not encouraged as you should not quit the app abruptly without the user's knowledge. But its alright if you show an alert and quit the app, and is really necessary to quit the app.

like image 84
EmptyStack Avatar answered Jan 20 '26 09:01

EmptyStack


No. And even if was technically possible, Apple would reject it. They don't like apps that are time limited -- note that even "lite" apps have to be useful in their own right.

like image 27
Stephen Darlington Avatar answered Jan 20 '26 10:01

Stephen Darlington



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!