سؤال

TO start off with - this app doesn't need to get into the App Store.

I'm thinking something along the lines of the following 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'm getting exc_bad_access, which is likely due to the fact that it needs an auth token - I could be wrong though.

Alternatively I'm trying using the following:

Class $SBApplicationController=objc_getClass("SBApplicationController");

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

Sadly the output is null - so I guess this can't be done within the application.

Any ideas? This is driving me crazy - thanks!

هل كانت مفيدة؟

المحلول

The iOS sandbox will block or kill any process which isn't started by iOS.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top