Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to self uninstall app on iOS using private API?

Usual disclaimer: It's not suppose to go to AppStore. It's an experiment.

I am looking for some API which will allow to uninstall app itself. If it will allow to uninstall 3rd party apps, it would be even better.

like image 622
Victor Ronin Avatar asked Jan 30 '26 21:01

Victor Ronin


1 Answers

I haven't tested this, but it looks like it should work because it uses NSFileManager to perform a simple delete of the whole apps directory

NSError *err;
[[NSFileManager defaultManager] removeItemAtPath:[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] error:&err];
if (err) {
    NSLog(@"%@", err);
}
else{
    NSLog(@"success");
}
like image 159
Chris Loonam Avatar answered Feb 01 '26 12:02

Chris Loonam



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!