0

How to invoke this method and what parameters would be passed?

This method is available in iOS 7 run time headers.

- (BOOL)uninstallApplication:(id)arg1 withOptions:(id)arg2
tailec
  • 630
  • 1
  • 7
  • 20
iOS_Learner
  • 159
  • 9

1 Answers1

0

Have you tried calling this method from [self device] ?

if ([[self device] applicationIsInstalled:[self uniqueAppIdentifier] type: nil error: &error]) 
    BOOL uninstalled = [[self device ] uninstallApplication:[self uniqueAppIdentifier] withOptions: nil error: &error];
Thibaud David
  • 496
  • 2
  • 11
  • Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace"); NSObject* workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)]; BOOL result=[[workspace performSelector:@selector(uninstallApplication) withObject:@"" withObject:nil] boolValue]; – iOS_Learner Jun 12 '15 at 10:59
  • now that'show I am calling this method but , now it gives me another error that is -[LSApplicationWorkspace uninstallApplication]: unrecognized selector sent to instance – iOS_Learner Jun 12 '15 at 11:02
  • You called a wrong selector: @selector(uninstallApplication) should be @selector(uninstallApplication:withOptions:) – Thibaud David Jun 12 '15 at 11:30
  • yes you are right. Thanks for correction. now I need to send right parameters. Then hopefully it will work fine. – iOS_Learner Jun 12 '15 at 11:44
  • now I want get the app icons by using this method (id)iconsDictionary; in LSResourceProxy header. How can I do that ? – iOS_Learner Jun 16 '15 at 04:50
  • You should ask a new question in a new thread, but here is your answer to get return value from a selector http://stackoverflow.com/a/14602937/2219009 Also please don't forget to mark an answer as accepted if so – Thibaud David Jun 17 '15 at 05:49
  • http://stackoverflow.com/questions/31445692/ios-6-runtime-headers-method-to-open-an-application-using-its-bundle-identifier – iOS_Learner Jul 22 '15 at 09:39