Temporarily Lock or Disable iphone home button

48,186

Solution 1

Note, from 2014 onwards: just to be clear,

this is now built in to iOS...

Click to accessibility, click "guided access".

Conrats for "inventing" it, PlanetUnknonw! :-)

The answer below is only of historic value...


For the record, it's silly that people are saying "Why would you want to do this?"

it's a great idea for example for APPS FOR SMALL CHILDREN (which is indeed a very large market on the iPhone).

If you've ever marketed an app for small children, you'll know that instantly parents write in abusing you because you "did not stop that stupid home button working, so the child just turns off the game and makes phone calls"

To which you have to reply that it's of course not possible because of the way the iPhone works.

So yes it's a good question. As far as I know, Planet, it is not possible.

Apple should add a "kids mode" where parents can lock the fone on TO one particular app for awhile. (Perhaps you would have to long-press or something the home button to unlock it.)

Solution 2

UPDATE

*iOS 6 reportedly has a "Single App Mode" - Check out vpdn's answer below https://stackoverflow.com/a/10503799/333259

This is against the iOS interface guidelines, and apps have been rejected for "overriding" or restricting behaviour of hardware buttons/switches.

I suggest you have a read of the App Store Review Guideline for iOS apps for a good overview of what you shouldn't be doing.

Particularly:

10.5

Apps that alter the functions of standard switches, such as the Volume Up/Down and Ring/Silent switches, will be rejected

Pretty sure that the Home button is included in that.

I'm not sure what your "idea" is here, but I would suggest you look into other things such as backgrounding. There is a feature that allows you to finish executing tasks in the background, even if the user presses the home button, and optionally display a notification after certain time (before the task "expires"). I imagine that this might offer a more appropriate solution (again dependent on what your idea actually is).

Solution 3

You can't unless you want to run it on jail broken devices.

Solution 4

Apple currently will not allow any software to disable or change ANY button functionality for iPhone, iPad, and iPod touch, so the only software solution is to jailbreak the device, so you're not forced to live by Apple's rules.

However, PaperclipRobot.com is about to release a home button cover specifically targeted to keeping young kids from pressing the home button. Not the exact solution to your problem as stated, but I figured it added to the discussion.

Solution 5

Unsure if you are looking for a way to do it in code in an app or if you're thinking of locking it in general.

Anyways, if you're looking for a way to do it in general, here's a guide for it

http://igrudge.net/how-to-disable-the-home-button-on-ios-devices-iphoneipad/

Share:
48,186
PlanetUnknown
Author by

PlanetUnknown

Updated on April 27, 2020

Comments

  • PlanetUnknown
    PlanetUnknown about 4 years

    I know the iphone home button is extremely crucial for the functioning of the iphone.
    However I have an idea for which I need the application running and the home button to be disabled. I tried googling, but haven't been able to find a solution.

    Temporary or timed locking (Lock for 5/10 mins.) would also do.

    The app. should work on non-jailbroken phones, hence going around apple won't work.

    Appreciate any ideas.