Such a string comes to the variable. You need to parse it and take the name of the application. this is a string

How to process it to take a specific value: SLGoogleAuth HalfTunes TheBackgrounder Calculator. Thanks in advance for any help.

  • from .app left to slash - Max Mikheyenko
  • yes from .app left to slash - vlad_22de
  • Can the string be in the form of text and not a screenshot? - Max Mikheyenko

1 answer 1

 Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace"); SEL selector = NSSelectorFromString(@"defaultWorkspace"); NSObject *workspace = [LSApplicationWorkspace_class performSelector:selector]; SEL selectorALL = NSSelectorFromString(@"allApplications"); NSArray *list = [workspace performSelector:selectorALL]; [list enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL *_Nonnull stop) { NSLog(@"item %@", [obj valueForKey:@"_bundleExecutable"]); }]; 
  • Do not tell me how to connect with my code? - vlad_22de
  • show your code, we will think - Max Mikheyenko
  • pastebin.com/i0XnCK7W - vlad_22de
  • corrected the answer. - Max Mikheyenko
  • Great thanks, I would also like to read something on this topic, since copy-paste does not want to copy - paste - vlad_22de