Restarting a VOIP application from the background using a private API

To begin with - this application does not need to go to the App Store.

I think something like this should work:

    mach_port_t *p;
void *uikit = dlopen(UIKITPATH, RTLD_LAZY);
int (*SBSSpringBoardServerPort)() = 
dlsym(uikit, "SBSSpringBoardServerPort");
p = (mach_port_t *)SBSSpringBoardServerPort(); 
dlclose(uikit);

void *sbserv = dlopen(SBSERVPATH, RTLD_LAZY);
int (*setAPMode)(mach_port_t* port, const char* appID, BOOL suspended, void* unknown, void* unknown2) = 
dlsym(sbserv, "SBSLaunchApplicationWithIdentifier");
setAPMode(p, "com.apple.weather", NO, nil, nil);
dlclose(sbserv);

However, I get exc_bad_access, which is probably due to the fact that he needs an authentication token - I could be wrong.

As an alternative, I am trying to use the following:

Class $SBApplicationController=objc_getClass("SBApplicationController");

NSLog(@"[$SBApplicationController sharedInstance], %@", [$SBApplicationController sharedInstance]);

Unfortunately, the output is null - so I think it is impossible to do this in the application.

Any ideas? It drives me crazy - thanks!

+3
source share
1 answer

The iOS sandbox blocks or kills any process that iOS doesn't launch.

+1
source

Source: https://habr.com/ru/post/1784433/


All Articles