在启动/启动时自动启动应用程序的首选方法?

时间:2011-11-04 00:35:41

标签: iphone ios jailbreak iphone-privateapi

我正在寻找在“kiosk模式”中构建越狱设备,其中只有我的应用程序可以在设备上运行。我希望我的应用程序在设备启动时自动启动。关于这个问题有很多问题:

然而,没有一个答案提供了太多细节。也许我可以实施-(BOOL) _shouldAutoLaunchOnBoot:(BOOL)boot;,返回YES,然后鲍勃是你的叔叔(我会试验一下)。也许我可以简单地用我自己的应用程序替换SpringBoard.app。有没有人做到这一点并愿意提供细节?

对于记录,这将用于一个环境,如果设备被越狱无关紧要,我将不会向App Store提交任何内容。

1 个答案:

答案 0 :(得分:2)

我不知道如何使用_shouldAutoLaunchOnBoot:但我在使用MobileSubstrate之前做了类似的事情

我迷上了 - [SBUIController finishLaunching]然后推出了我想要的应用程序

-(void) appLaunch {
    if ([[[UIDevice currentDevice] systemVersion] floatValue] < 4.0) {
        if ([[objc_getClass("SBIconModel") sharedInstance] iconForDisplayIdentifier:bundleID] != nil){
        [[[objc_getClass("SBIconModel") sharedInstance] iconForDisplayIdentifier:bundleID] launch]; 
        }
    }
    else {
        if ([[objc_getClass("SBIconModel") sharedInstance] applicationIconForDisplayIdentifier:bundleID] != nil) {
        [[[objc_getClass("SBIconModel") sharedInstance] applicationIconForDisplayIdentifier:bundleID] launch]; 
        }
    }   
}

为了确保没有人可以使用主页按钮退出应用程序,您可以挂钩并阻止SpringBoard的menuButtonDown:和menuButtonUp:。你可能不得不阻止其他一些事情,但这应该让你开始。

相关问题