14

First of all, I'm completely aware that doing this will get my app rejected by Apple, that it's a poor user experience, and so on.

My question is fairly simple, is there a way using private APIs to disable the home button? The aim is to effectively put an iPad into kiosk mode.

Ben Williams
  • 4,695
  • 9
  • 47
  • 72
  • Good question. I've been thinking of coining some iPad kiosk projects and this never occurred to me. I wish I knew the answer. Putting a metal plate over it would be weak. But if you do manage to disable it you would need some secret combination to re-enable it probably. Or not. – nickthedude May 20 '10 at 05:59
  • No, I agree, you would need to be able to re-enable, even if it's just to update the app or whatever. I was thinking of just having a setting in the app to control whether the home button is active or not - password protected if need be. – Ben Williams May 20 '10 at 07:10
  • Maybe this will help: [http://igrudge.net/how-to-disable-the-home-button-on-ios-devices-iphoneipad/](http://igrudge.net/how-to-disable-the-home-button-on-ios-devices-iphoneipad/) This will put your device in kiosk mode. – njalk May 09 '12 at 18:55

4 Answers4

12

You can't disable the menu button. This is handled by the SpringBoard which you cannot control unless the device is jailbroken.

You can relaunch the app immediately after the user quit, however. Assuming you have registered the kioskRelaunch112084 URL scheme:

-(void)applicationWillTerminate:(UIApplication *)application {
    [application openURL:[NSURL URLWithString:@"kioskRelaunch112084://"]];
}

Note that the user can still force-quit the app.

kennytm
  • 510,854
  • 105
  • 1,084
  • 1,005
  • Thanks. If I've got this correct, the URL is just one that you made up. So, I just need to register my app to handle URLs of that type, or whatever type I choose? – Ben Williams May 20 '10 at 10:32
  • @alku83: Whatever you choose. – kennytm May 20 '10 at 10:41
  • 6
    It looks like this solution is no longer functional in IOS 4. The application object doesn't seem to respond to openURL in any of the going-out-of-focus callbacks, nor in background tasks after the app had closed. – JoshRivers Oct 24 '10 at 18:30
12

It can be done really easily using a mobile config. See my answer here Lock-down iPhone/iPod/iPad so it can only run one app

Community
  • 1
  • 1
Rick
  • 1,828
  • 17
  • 14
  • This is by far the best solution its just not explained how to deploy. There are also tons of additions to his file to increase security. i.e.password triggered removal. Gesture recognition to disable, etc. – rinzler Mar 29 '12 at 23:28
  • Deploying is quite easy. I answered a comment on my blog about it but should also here and in the linked answer. To deliver your config from the web all you have to do is direct the iPhone to a url containing the profile. Just open the link to your .mobileconfig file in safari. If you don't have web space you can just use dropbox public folder URLs or switch on your mac webserver. – Rick Mar 30 '12 at 11:51
  • @rinzler How do you add password triggered removal and gesture recognition to disable? kindly share your idea. – Durai Amuthan.H Jan 20 '14 at 12:20
0

If it's going to be in a kiosk of some sort, can you just put a metal plate over it, and mount the thing tightly enough so that it can't reasonably be pressed?

dash-tom-bang
  • 17,383
  • 5
  • 46
  • 62
  • I guess it's a last-ditch option, but would be much more preferable to do it programmatically. I suppose, we could always put glue in the home button as well :) – Ben Williams May 20 '10 at 02:42
  • Yeah that was actually my first thought. Depending on how permanent you want it, you could also glue a strip of something over it. – dash-tom-bang May 20 '10 at 02:57
-1

You might take a look under the hood of this app as a place to start.

Also, rather than a strip solely around the home button, try this.

Chris Frederick
  • 5,482
  • 3
  • 36
  • 44
joshdcomp
  • 1,618
  • 3
  • 19
  • 26