58

We'd like to 'lock-down' an iPhone/iPod/iPad so that the user can only run one app (we've developed this app internally). I'm guessing we'd be looking at jailbreaking, and then replacing (?) the default Springboard app.

Can we do this? If so, how?


EDIT: iOS 7 now includes an 'App Lock' payload as part of the device configuration profile. From the Apple docs:

"By installing an app lock payload, the device is locked to a single application until the payload is removed. The home button is disabled, and the device returns to the specified application automatically upon wake or reboot."

Read more about it here:
https://developer.apple.com/business/documentation/Configuration-Profile-Reference.pdf

Cœur
  • 37,241
  • 25
  • 195
  • 267
wpearse
  • 2,422
  • 2
  • 29
  • 30
  • 1
    Why would you want to do this? your more likely to create a very unhappy user by giving them a device that is so heavily crippled. Plus the moment they come up with a good reason (and they will) to put something else on there (email, web browsing, etc), you will have wasted your effort. I would suggest that in the long run, it would be better to pre-load the app for your users and not crippling the device. – drekka Feb 16 '11 at 02:25
  • 9
    The 'users' are techs in our company. We're giving them devices to help them accomplish a very specific task and we've developed software to assist them. They are not personal devices, they're company devices that will be docked in the workshop at the end of each day to charge. We don't want the techs browsing the web/playing games/music/emailing etc. Sounds nazi-ish, I know... but that's the way it is. – wpearse Feb 16 '11 at 02:50
  • [This answer](http://stackoverflow.com/questions/4570511/can-i-disable-home-button-on-my-app-full-screen-browser-kiosk-mode/4570520#4570520) may help you (using the built-in Restrictions feature). –  Feb 16 '11 at 02:57
  • 1
    This is a feature of iOS 6 that can be used without hacky attempts. It's called 'guided access' see my answer below. – brainray Oct 18 '12 at 11:06
  • Very nice. Been looking for something like this for my 3GS on iOS 5. The phone is being used for skype calling only by a non technical elderly person. Limiting the device to only use skype saves a lot of hassle for the user. – foureight84 Mar 24 '14 at 14:59

8 Answers8

98

It is possible to put an iPad or iPhone into 'Store Demo' mode so that the home button and swipe to home gesture is disabled. If you have seen the iPads in the Apple Store running the smart sign apps then you will know what I mean.

It is actually pretty trivial to make this work, all you need to do is install a correctly formatted mobile config plist over the air from a web server.

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.

It's possible that you can load the config using IPCU too but I have not tried this. This config file will not load in the iPhone Configuration Utility as it uses keys that IPCU doesn't know about. You can combine this with whatever other enterprise configuration profiles you have in play.

EDIT: @cocoanetics pointed out that IPCU is not required to remove the profile. However note that to get your device back to normal you would need to do the following:

  1. Reboot
  2. Open the settings app FIRST - don't open anything else or you will need to reboot again
  3. Settings->General->Profiles->[your profile] remove it.
  4. Reboot

you should be back to normal.

I have included an example plist that will disable the home button and lock your device into the app.

BEWARE

Once this profile is installed the first app that is launched when the device is rebooted will be the only app that will run until you reboot the device again. As @Cawas has said this completely disables the ability to return to the home screen (unless your app crashes) including accessibility assistive touch.

Note that after installing the profile you must reboot the device (power off, power on) for it to take effect. To remove the profile plug the device into IPCU and delete it then reboot the device. Everything will be back to normal.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>PayloadContent</key>
    <array>
        <dict>
            <key>PayloadDescription</key>
            <string>Disables home</string>
            <key>PayloadDisplayName</key>
            <string>Home Button Lock</string>
            <key>PayloadIdentifier</key>
            <string>com.hbkill.kiosk</string>
            <key>PayloadOrganization</key>
            <string>My Org</string>
            <key>PayloadType</key>
            <string>com.apple.defaults.managed</string>
            <key>PayloadUUID</key>
            <string>B2D02E2D-BAC5-431B-8A29-4B91F71C9FC1</string>
            <key>PayloadVersion</key>
            <integer>1</integer>
            <key>PayloadContent</key>
            <array>
                <dict>
                    <key>DefaultsDomainName</key>
                    <string>com.apple.springboard</string>
                    <key>DefaultsData</key>
                    <dict>
                    <key>SBStoreDemoAppLock</key>
                    <true/>
                    </dict>
                </dict>
            </array>
        </dict>
    </array>
    <key>PayloadDescription</key>
    <string>Disables Home Button</string>
    <key>PayloadDisplayName</key>
    <string>Home Button Lock</string>
    <key>PayloadIdentifier</key>
    <string>com.hbkill</string>
    <key>PayloadOrganization</key>
    <string>My Org</string>
    <key>PayloadType</key>
    <string>Configuration</string>
    <key>PayloadUUID</key>
    <string>614D1FE3-F80D-4643-AF6B-D10C4CC8737A</string>
    <key>PayloadVersion</key>
    <integer>1</integer>
</dict>
</plist>

You may well have moved on from this but I thought I would post this answer here as I came across the question while I was trying to figure out how to do the same thing.

Rick
  • 1,828
  • 17
  • 14
  • 8
    Important note, your file must be named something.mobileconfig I spent about an hour of frustration realizing this. Thanks for posting Rick, this it is exactly what I needed. – The Dog Feb 16 '12 at 05:33
  • @TheDog yes, good point. I'll make that clearer in the answer – Rick Feb 16 '12 at 11:28
  • I've found some troubles removing the config. It doesn't show in the IPCU. – SlowTree Feb 22 '12 at 17:22
  • @SlowTree I haven't ever had that issue. You can't edit the profile with IPCU but you should be able to add/remove it without problem. You can always reboot the device then go straight into settings and remove it from there. – Rick Feb 27 '12 at 08:02
  • 2
    You can also remove the profile via Settings app. No need for IPCU. – Cocoanetics Feb 29 '12 at 16:03
  • @Cocoanetics yes, but only if you got straight to settings (do not pass go, do not collect £200) as otherwise you are locked in to the first app you open, which in this case should be settings app. You do have to reboot the device again after removing the setting using settings app. – Rick Mar 06 '12 at 17:19
  • How can you find the Application ID for a WebApp? – patrick Apr 06 '12 at 16:05
  • 1
    @patrick I am not quite sure what you mean by the Application ID. If you mean the value for the PayloadUUID key then the actual value is arbitrary so long as it its value is unique to the device you are installing it to. The easiest method is to use the OSX command line tool uuidgen. StudioIMac:~ rick$ uuidgen 85E0851C-AC7F-4CB2-ACBF-82B46E544043 – Rick Apr 08 '12 at 19:07
  • 1
    Well, I did not understand how to say which application should start first, I thought I should pass the ID of the app. Seems that *SBStoreDemoAppLock* is the app that is started first, is this right? So how can I change it to start a webapp instead (if it is possible)? Thanks :) – patrick Apr 09 '12 at 10:48
  • 1
    All the config does is disable the home button so it doesn't matter what you start first. It is up to the user who is in control of the device at boot time what app to start. – Rick Apr 10 '12 at 08:52
  • Rick, you should add @Cocoanetics into your answer... And the config doesn't simply disable the *button*. Anything related to "going home" stop working, including gestures and accessibility tools. – cregox May 14 '12 at 23:00
  • @Rick, I'm getting the following error while trying to install. : (Error) MC: Failed to parse profile data. Error: NSError: Desc : Invalid Profile US Desc: Invalid Profile Domain : MCProfileErrorDomain Code : 1000 Type : MCFatalError Can you please help me out.. – Bhushan Kawadkar May 15 '12 at 15:34
  • @Cawas I said up top it also disables the gestures, not sure what you mean by "you should add Cocoanetics into your answer". – Rick May 17 '12 at 19:44
  • 1
    @Bhushan its possible the latest version of iOS has killed this. As it also killed the home screen shortcut methods. I have never seen that error before sorry. – Rick May 17 '12 at 19:44
  • I was responding to your comment "all the config does is disable the home button", didn't notice you mentioned gestures in the answer. Nice! So now you're just missing the accessibility tools and Cocoanetics comment (about not *needing* IPCU) on your answer. ;) – cregox May 17 '12 at 20:08
  • @cawas ahh I get you. yes I did clarify it in a comment reply, but who reads the comments eh? I'll updated it for completeness. – Rick May 18 '12 at 14:12
  • 1
    Apparently, I do read the comments, even more than answers! :P – cregox May 18 '12 at 16:24
  • Anyone found a way to automatically launch an app at boot time? – ygbr Jul 04 '12 at 11:24
  • Thanks for a great answer. One question -- you say the first app you run will be the only app that will run, since you can't get back to home. But if that app launches another app (via a URL scheme), will that still work? – Ghopper21 Feb 08 '13 at 03:33
  • 1
    @Ghopper21 Yes. In fact I have relied on this in "production" by trampolining from a crashing application into another launcher app that then causes the initial app to restart. – Rick Feb 19 '13 at 15:36
  • It doesn't install in iOS7.iOS 6 Configuration profile reference(https://developer.apple.com/library/ios/featuredarticles/iPhoneConfigurationProfileRef/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010206-CH1-SW4) specifies for App Lock Payload (PayLoadType=com.apple.app.lock). kindly share your take on this @Rick – Durai Amuthan.H Jan 20 '14 at 12:06
  • FYI:Some Important parts of the config profile are SPRINGBOARD and SBStoreDemoAppLock. com.apple.springboard is a plist file in iOS . SBStoreDemoAppLock is a key and we enable it by giving true.Actually SPRINGBOARD is the standard application that manages the iOS home screen and some of its other tasks are launching and bootstrapping applications and setting some of the device settings on startup.To know more about SPRINGBOARD Plz refer http://en.wikipedia.org/wiki/SpringBoard To know the basics of creating configuration profile Plz refer http://www.petri.co.il/iphone-configuration-utility.htm – Durai Amuthan.H Feb 12 '14 at 12:12
23

This is a feature of iOS 6 that can be used without hacky attempts. It's called 'guided access'. I small tutorial is here.

EDIT: In case the device's battery runs empty while it's in the hands of a restricted user, the user could reload the device and it will reboot without guided access. However, if you choose to use a password for the device, this shouldn't be a problem.

brainray
  • 12,512
  • 11
  • 67
  • 116
4

An alternative to the (admittedly much simpler) approach described by Rick is to:

Yang Meyer
  • 5,409
  • 5
  • 39
  • 51
3

http://www.apple.com/support/ipad/enterprise/

Apple provides enterprise configuration tools which allow control over which applications are permitted etc. This is done through profile management it seems. See link for more details

James Selleck
  • 199
  • 2
  • 9
2

I agree with a comment from some hours ago: Settings > General > Restrictions should do the trick. If the user can't install anything, can't access Safari or Mail, then there is no reason to ever quit your app.

Kevin Renskers
  • 5,156
  • 4
  • 47
  • 95
0

i found one way to quit this home-lock state. i have install "backgrounder" via cydia which make your app run in background if you press home button for one second or more. and now, when i longpress home button, i back to the home screen.

that is all.

pay attention on longpress.

iWill
  • 135
  • 1
  • 4
0

Um- wasn't sure if this is an answer or a comment but - the solution that is now part of the question has a weakness - our support staff used this and found that if you "Tap the power button to ‘soft-off’ then hold the home button as you power on and slide to unlock. Sometimes iPad will start on the home page or else XXAPPLCATIONXX will hang and then drop out to the home page. Eitherway X is able to access the home page without the passcode."

Joe
  • 4,367
  • 7
  • 33
  • 52
  • Is this with guided access mode, or the provisioning profile? – wpearse Jan 17 '13 at 20:52
  • Correct. As Rick notes in his answer, all the provisioning profile does is disable the home button. Also, iPad will always start on the home screen when it is first powered on ;) (Whether the iPad has the provisioning profile installed or not.) – wpearse Jan 19 '13 at 04:52
0

Block internet access from device (MAC-filter on wi-fi can do the trick). Any other non-internet related problem (music, games, etc) should already be solvable by the current IT infrastructure (unless your developers plays and listen to MP3 at work).

Eduardo Costa
  • 1,974
  • 1
  • 16
  • 22