0

I'm not too familiar with Iphone development, but I am trying to create an App that can lock the screen and prevent the user from using the phone under certain conditions.

I have been told before that it is impossible for this type of functionality to exist in an Iphone, but I know there is an app called Cell Control that does something similar. I am trying to figure out how to create this type of functionality.

My research has led me to MDM solutions that was introduced in IOS4. This link was very helpful: http://flicksoftware.com/2010/08/mobile-it-guide-to-iphone-deployment-and-management-with-apples-ios-4/

My question is how would one go about implementing a lock screen functionality in an Iphone app. Is it using some implementation of the MDM solution, or doing something else entirely?

pnuts
  • 58,317
  • 11
  • 87
  • 139
Garrison_Laforge
  • 137
  • 2
  • 10
  • 1
    Whoever told you that this was impossible just meant that this is impossible to make and sell on Apple's AppStore... you can make this app for private use or sold direct to your client using private frameworks among other things. – Albert Renshaw Jul 16 '14 at 17:42

2 Answers2

1

The iOS SDK doesn’t provide a way to do this from an app. The device can be locked into a particular app using Guided Access and probably using an MDM feature as you describe, but that has to be activated manually by the user (or the administrator in the MDM case) and is not under the app’s control.

Noah Witherspoon
  • 57,021
  • 16
  • 130
  • 131
1

Combining Albert and Noah answers and adding some more details.

1) iOS public API doesn't have anything which will allow you to do that. You can use private api's to do that. However, you won't be able to distribute such application through AppSotre. Also, you have ability to sign it with enterprise certificate and distribute it in your compan.

Also, you can provide such functionality on jailbroken iOS device and sell it through Cydia.

2) Noah correctly pointed out that you can use guided mode to prevent iOS device from switching to another apps. However, there are gotchas. iOS device can be managed only by one MDM server. So, a device will have to be managed by your MDM server (and it won't work if a user has 3rd party MDM installed on your device).

There are couple of open source MDM server (which are good start to look into it):

Community
  • 1
  • 1
Victor Ronin
  • 22,758
  • 18
  • 92
  • 184
  • Thanks, these are some great leads to get me in the right direction. – Garrison_Laforge Jul 18 '14 at 15:48
  • @VictorRonin you mentioned private api's to programmatically lock iOS, do you have a specific one in mind - since all the good old GSEvent stuff is not available anymore ? I'm looking for a way to block/lock the screen (by any manner) - obviously this is only intended for private distribution... – JBA May 20 '16 at 16:28
  • @JBA Sorry. I didn't touch any private API's for at least couple of years. As result my info is really out of date (based on iOS 7 knowledge) – Victor Ronin May 20 '16 at 19:10