I'm looking to build a jailbroken device in "kiosk mode" where only my app can run on the device. I'd like to have my app automatically launch when the device boots. There have been a number of questions asked about this:
我打算在“kiosk模式”中创建一个越狱设备,在这个模式下只有我的应用程序可以在这个设备上运行。我想让我的应用在设备启动时自动启动。关于这个问题有很多问题:
- Loading apps while iPhone starts up (boots) or after a shutdown
- 当iPhone启动或关机后,加载应用程序。
- Application on iPhone Startup
- 应用程序在iPhone上启动
- ipad lockdown: launch app on boot?
- ipad锁定:启动程序启动?
- Load the iphone app automatically when phone boots
- 当手机启动时,自动加载iphone应用程序
However none of the answers have provided much detail. Maybe I can implement -(BOOL) _shouldAutoLaunchOnBoot:(BOOL)boot;
, return YES
and bob's your uncle (I'll experiment with that). Maybe I can simply replace SpringBoard.app with my own app. Has anyone accomplished this and willing to provide details?
然而,这些答案都没有提供太多细节。也许我可以实现——(BOOL) _shouldAutoLaunchOnBoot:(BOOL)boot:(BOOL)boot;,返回YES, bob's your uncle(我将对此进行实验)。也许我可以简单地更换跳板。用我自己的app开发app,有人完成了吗,愿意提供细节吗?
For the record this will be used in an environment where it doesn't matter if the device is jailbroken, and I won't be submitting anything to the App Store.
对于记录来说,这将用于一个不管设备是否越狱的环境,我不会向应用商店提交任何东西。
1 个解决方案
#1
2
I don't know how you could use _shouldAutoLaunchOnBoot: but I've done something similar before using MobileSubstrate
我不知道如何使用_shouldAutoLaunchOnBoot:但在使用mobilesub平铺之前,我也做过类似的事情
I hooked -[SBUIController finishLaunching] and then launched the app I wanted
我迷上了(SBUIController完成了发射),然后推出了我想要的应用
-(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];
}
}
}
To make sure that no one can exit the app using the home button you could hook and block SpringBoard's menuButtonDown: and menuButtonUp:. You'll probably have to block a few other things but this should get you started.
为了确保没有人可以使用home键退出应用程序,您可以挂起并阻止SpringBoard的menuButtonDown:和menuButtonUp:。你可能需要阻止一些其他的事情,但这应该让你开始。
#1
2
I don't know how you could use _shouldAutoLaunchOnBoot: but I've done something similar before using MobileSubstrate
我不知道如何使用_shouldAutoLaunchOnBoot:但在使用mobilesub平铺之前,我也做过类似的事情
I hooked -[SBUIController finishLaunching] and then launched the app I wanted
我迷上了(SBUIController完成了发射),然后推出了我想要的应用
-(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];
}
}
}
To make sure that no one can exit the app using the home button you could hook and block SpringBoard's menuButtonDown: and menuButtonUp:. You'll probably have to block a few other things but this should get you started.
为了确保没有人可以使用home键退出应用程序,您可以挂起并阻止SpringBoard的menuButtonDown:和menuButtonUp:。你可能需要阻止一些其他的事情,但这应该让你开始。