Disable Home Button - iphone

I know this has been asked previously however I would like to disable the home button for an in-house app which will be distributed internally across iPads.
I have searched for a solution both on here and Google and would like to stop users from putting the app into the background. I have seen one solution which doesn't seem to work under iOS 4.0 which opens the app up again when the home button is pressed.
Could I make use of any private APIs to do this seeing as this is an internal app and won't be reviewed by Apple for the App Store?
Thanks

I don't know why this is down voted so much it is a perfectly legit use case for an internal enterprise application. Kiosks, POS etc.
Anyway anyone wanting to know how to do this should see my answer here Lock-down iPhone/iPod/iPad so it can only run one app

Whatever your reasons are you are not able to do this.
Apple provides no functionality to perform this action through their API. You might want to re-think your strategy. Look maybe instead for a physical barrier.
Additionally you might want to look into JailBreaking and iPhone since you say it is only for internal development and won't go to the appstore. A jail broken phone might allow you access to change the home button behavior, though I cannot confirm this since I have never had need to code on a jail broken device.

If it's your iPad, glue or bolt a cover over the home button. Connect the iPad to Xcode or iTunes to halt and/or reload your app.
But note that knowledgable users will still be able to reboot the device by holding down the lock button.

Jailbreak and add incarcer app can disable the home button (admin has a code to allow activation). Then you're locked in your app. If you're up for jailbreaking, seems like a great solution.
There's a new hardware solution, adhesive-backed aluminum home button covers. They allow home button activation through a pinhole, using a paperclip (similar to many popular metal encosures). http://bubcap.com/bubcap-pro.html

Related

Can you modify the iphone password screen?

Is there a way I could make an application to add a button to the lock screen (enter your password)? For iOS/iPhone devices?
Is there a way I could make an application to add a button to the lock screen
No, I don't believe that there's a public API for that sort of thing. Apple can obviously do it, since the iPad lock screen has a button that shows you a photo gallery. But that doesn't mean that third party applications have that capability, and I'd be very surprised if you could pull that off without jailbreaking your device.
No, this is outside of your applications sandbox. Unless you jailbreak the device, there is no way to run outside the application sandbox(with minor exceptions such as playing music).
You can't. This is against the sandbox policy.
NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
but there are apps in cydia that do this kind of thing
To be simple, there is no such API to make customizations on the iOS itself. Neither does Apple allow it.

Iphone Lock Screen

friends, I am new to Iphone development, I am creating a simple analog clock, infact I have already created one ( i am basically an Android Developer - created same as widget for android too), Iphone does not seem to support widgets, but I was wondering if it is possible to create a lock screen app or something (i.e. when screen locks iphone shows a clock) is it possible that my clock replace the iphone one, any ideas , thanks in advance
It is impossible to replace the lock screen of iOS devices with a custom one. iOS apps are not allowed to "lock" the system by any means. Can't avoid the user pressing the home button.
No it is not possible. There is no public API for the lock screen.
Although you may be able to find a way to accomplish your goal in development, it will almost assuredly be rejected by Apple. Here is an excerpt from the App Store Review Guidelines
10.4 Apps that create alternate desktop/home screen environments or simulate multi-app widget experiences will be rejected
It is 100% possible but not approved by Apple. You can develop an app but will never be part of the app store... You can however use it for personal use or share it through a Cydia repo (jailbroken devices). But it is possible.
Not sure with all of you, although i agree a long time ago.. I Just browsing the app store and found an application that can change the way user unlock the iphone after it lock.. Here's the app "Slide your phone"

App should launch on it's own after hitting the home button to pull the phone out of sleep mode

We have built an Cydia app for jailbroken iPhones. Now my client wants the app to launch on it's own after the user hits the home button to pull the phone out of sleep mode. How can I accomplish this?
This would require you to redefine the functionality of the home button, or at the very least add functionality to, which Apple does not allow. It is possible, but it will get rejected from the app store.
EDIT: Didn't notice this was for jail broken iPhones, so yes you can do this. You would need to find custom Libraries, I don't know of any of the top of my head. Alternatively you could figure out what part of the private Apple API you need to use to do this.
Please note that changing button functionality is not the best of ideas... Perhaps you could accomplish the same thing by running in the background and using push notifications when user interaction is required?
zmaster pulled this same function off on his Android Lock jailbroken app. It shouldn't change the function of the home button, it would still pull the phone out of sleep mode but the app would launch just as any normal password protection would.

Can I disable Home Button on my App? (full screen browser kiosk mode)

I have to put a lot of iPads on a stantd on a tourist fair to show our web, and we don't want that people can use these iPads to play/enter facebook/etc. Is for this that I was searching an application that put the iPad on kiosk mode to show fullscreen our web, but that's ridiculous if the user can press home button an go to springboard...
Is for this that I start to develop a fullscreen browser without address bar, only show a URL that is selected programatically, and I think to deploy this app on our iPads (we have a developer account), but we have the same problem: if the user press home button, he can select Safari and enter to any website.
In conclusion, we need to disable home button to hold the user on our website (I know that if press and hold home button + power button, iPad reboot, but the power button will be disable physically on the stand), and I also know that this app will not be approved by Apple, but as I said before, this app will be only to the fair stand.
Thanks.
Four years after, I found the response.
No, you cannot disable the home button. (And thank Apple for that. Who knows how many people would believe that their app is so fantastic that people ought not stop using it ever.)
Why do you need to disable the home button anyway? Why not build a stand for the iPad that blocks access to the home button?
Could you not use the parental controls to restrict/prevent access to Safari, Mail app's etc?
On iPad,
Settings > General > Restrictions
You can then easily remove app's such as Safari from the ipad's springboard, and to enable access requires a code (which you set) so no one would be able to access default app's that you don't want them to :)
Of course people would still be able to exit your app by pressing the home button, although they would not be able to do anything, and you can even stop them from deleting apps through the restrictions settings.
The only way to prevent exiting via the home button would be to physical stop people from pressing it by having the stand cover it over.
There are companies that make specific products for this type of thing. Here is a write up a couple (they are not cheap)...
http://www.tuaw.com/2010/04/26/ibracket-turns-your-ipad-into-an-ikiosk/
Steven
Probably too late for the OP but for anyone else trying to do this then see my answer here Lock-down iPhone/iPod/iPad so it can only run one app
I had been trying to do the same use case and pretty much everyone on stack overflow is saying it's not possible. Turns out that it is.
More than 4 years after, I found the answer, haha.
I'm not sure since when, but now we can block to use only one app from Settings > General > Accessibility > Guided Access
After that, we can do triple tap with our app opened, and it will be locked.
Also, we can use Apple Configurator to "Lock to App", but this way required to install a profile in the iPads (it wouldn't be a problem four years ago...).
It is possible. But I think Apple may reject your app. I found a link with good explanation here
And this might help also.
http://www.akadia.com/services/ssh_test_certificate.html
http://www.verisign.com/support/verisign-intermediate-ca/code-signing-intermediate/index.html
Blocking home button access is desirable where these units are used commercially as promotional displays or in point of sale environments. It would be useful, actually, if Apple licensed developers of point of sale apps to be able to do this - it would be no problem for this function to be specific to registered ipad units....and it would also make the ipad less of a theft target. it would be useless to anyone but the owner. right now the only answer is to physically cover the button in an enclosure, thus concealing Apple's investment in a beautiful product design.
Achieveable in software like so:
Settings > General > Accessibility > Guided Access
Set a pin if your iOS device has public access.
once in the app you want to lock down, triple click the home button to enable guided access. With this on users will be restricted to your app (or webclip) and required to enter the pin to exit to iOS home if they hit the home button.
There is no solution for this issue, maybe if you jailbreak your device, there is one, but I don't think so.
Please see: Temporarily Lock or Disable iphone home button
Why do you need to block the button? If it's some kind of evil plot to make developers only use the device for developing, the home button IS important: you must test what happens when the real user do that.

iOS (Apple): Is there any way for the application to ask the OS to block the device in that application?

I would find useful, in some cases, and under the user's permission, to block the device so only the running application can be accessed unless the usrer's password (pattern or whatever is used to unlock the session) is introduced.
I guess the mecanism should be something like: The application asks the os to do this, the OS asks the user for permission and then the application asks the device to block the application on "exit" or standby (or both).
This would be useful for using an iPhone or iPad as a device for public use. One example could be a Library where visitors can see the book list and some previews in the device. In this case, you don't want the user to access any other resource/application in the system.
Does it make sense?
What your asking is there any type of kiosk mode for iOS devices.
The short answer in no. The longer answer is if you're using a Jail broken device you might be able to relaunch the app on exit, but it would take significant R&D.
I hade a client ask about this last week, after some investigation and thinking I told her,
It's best to look for a case that blocks the home button. Or some kind of security bracket. It'll be cheaper and easier.
Also any App you create with this functionality would be rejected form the App store.
If your looking for advice on programming Jail broken devices there is a Stack Exchange proposal you can follow.
Supposedly there's a way to have a "kiosk" mode with a .mobileconfig file. Both of these articles talk about it, basically covering the same territory:
http://joris.kluivers.nl/blog/2012/03/02/kiosk-mode-for-ios/
http://rick-hawkins.blogspot.ca/2012/01/turning-ipad-into-kiosk-device.html
I was looking into this again and found out that iOS already supports the feature. It is called Guided Access, it was incorporated on iOS 6, it does not require jailbreak and can be used for any app installed on the device.
It makes sense, but I don't think you can do that without jailbreaking the phone. In iOS, the home button cannot be overridden by applications. Besides there is cheaper hardware out there for kiosk-style applications.