How to lock down user to Single App mode in iOS 6, Programmatically? - iphone

There are some question which are related to this,. but getting the exact answer:
Lock-down iPhone/iPod/iPad so it can only run one app
Recently iOS 6 is introduced with some business oriented features, two of theme are:
Guide Access
Supervised Access
These both deals with Accessibility Control features, Like allow user to restrict access to there device, only if they have full access to the device. In that way this is only useful to people, who owned the device like, a school use there device for exam, a restaurant for menus, for product display etc. All of them have access to the device to configure settings etc.
Now my question begins here, I am thinking of an App, which look down user to single app mode when user run the app and after signing out of the app the device start working as before in normal mode.
Through the time when app is active, user should not able to access any other function or button, this applies on all three device iPad, iPhone, iPod.
Also I found that this could be done by installing some Profiles etc, which looks wired and we can't ask user to do so.
So the simple idea is user will only install the App, as normally he does and we could lock him down to single app mode when he log into the app.

The SureLock iOS app does nothing but inform the user how to do it in your system preferences.
Doing it from the app itself is only possible, if you break the rules about private frameworks. And break it hard.
I am sorry to tell you that the way you present your idea, would never be approved for the AppStore.

The accepted answer to this question is no longer correct:
Starting with iOS 7, UIKit exposes the function UIAccessibilityRequestGuidedAccessSession as public API.
I don’t know, but can very well imagine that this function existed as private API dating back to iOS 6, where the guided access feature was introduced.
Note that for this method to have any effect, the device in question must be supervised using MDM, and the ID of the app you want to use this API must be included in the device management profile deployed to it.

Hi may be I am late but I have a good news for you.
Apple provide a new feature in IOS 7 and we can lock the user to single mode without user permission(Lock and unlock mode) here is the apple documentation link
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIKitFunctionReference/#//apple_ref/c/func/UIAccessibilityRequestGuidedAccessSession
the other way is to install the profile config profile like is
http://ipadhire.co.nz/lockdown.mobileconfig
it lock the home button of IPhone and enable single mode

For this you have to do following..
access apple's private api's
access apple's private framework
Apple don't encourage accessing there private api's specially when it comes for App Store, if you accessed the private api's at the time of application review on App Store they will reject the app giving you a message of "accessing a private api".

Related

Automatic OTA updates in an ios app which is locked down with guided access

My client needs to find a way to automatically push app updates to a number of iphone 3gs devices remotely. These devices will be in guided access mode so the users will only be able to access the app in question.
I believe we have two option for distribution:
B2B custom app via the Volume Purchase Program
In-house app released with the Apple Enterprise Program
Having researched our options I can see that over the air app updates can be achieved by either:
Building an in-app update functionality to check for new updates (Enterprise only I am guessing?) and automatically update and restart the app
Using an MDM such as http://www.air-watch.com/ (as I understand Apple Configurator must have devices plugged in via USB to work?)
I am wondering if anyone can tell me whether either of those options are possible with the devices being in guided access mode?
Or are there any other solutions, which I have missed, that can automatically manage the app remotely while the device is in guided access mode?
You can solve this with an Enterprise distributed app.
App only. Update check for an OTA-Update from your app when the app is coming to the foreground (or some other metric at your clients leisure, like added time delay, etc). Basically self explanatory; you implement a call to your clients/your API to check the version and inform the user of a new one. The update can either be optional or mandatory (preferably announced by the API and changed when needed); present the user with an alert about it. The user acts upon it and you OTA install via an ITMS link provided by your API call. And that's it.
MDM. Tbh, I'm a bit on shaky ground here. Theoretically this is all possible via MDM too, however I am not sure if it is the (varying) MDM solutions or some misconfigurations, but clients usually seem to lose control after some time.
Both. Yes, you can perfectly well live with both. MDM while everything is fine, and as a backup a well structured App+API mechanism to push the OTA updates out. This is especially useful if you have customers where some departments are under MDM and others are not. So, some may get it via MDM (and if all else fails via the App itself), the rest will get it via the App.
The tradeoffs are a matter of personal preference, if there is a fully working MDM solution in place the update will be pushed out and the user however 'malicious' can do nothing against it. But the same is true for the 'App only' solution, as you have the option to not let him use the app if he does not update (either by not providing a cancel button or, as you are in an enterprise environment and there it is allowed doing an exit(0)).
From experience I prefer any solution that has the 'App only' option as it is the last fallback if anything on client side fails. Whatever may be added on top is just sugar to the cake.
While not strictly relevant, the 'App only' solution always goes well with Push Notifications when an update came out.

Restrict my iOS device to a particular app

I'm searching a way to restrict my iOS device to a particular app.
I have found a good way to disable my iPad Home button functionality through Kiosk Mode for iOS
So is it possible to restrict my iOS device to a particular app without jail-breaking?
Will App-Store reject my application if I done this?
Phew... Finally I found.Guided Access is a new feature in iOS 6 that will do the functionality .It's a built-in feature.
Guided Access is activated for a particular app, iOS device will automatically launch that app every time.
You can power off the device by holding down the "Power + Home" button.
If you’d like to learn how to use Guided Access in iOS 6, You can see more details here
That is a huge security violation as far as the App Store would be concerned. For an enterprise applications its possible you could find a way. But for a public App Store download this is not only next to impossible its also a guaranteed rejection.
So is it possible automatically launch my app every time after iPad booted without jail-breaking?
No. Jailbreaking only will allow you to mess with the default behavior of the system such as Launch Items
Will Apple-Store reject my application if I implement the behavior?
If you somehow find a way to circumvent the issue, (i.e. exploit a security breach) then your app will be rejected.
App review guidelines, section 2.4, 2.5

Can an iOS app have no icon?

Is it possible to create an app that does not appear in the Home screen, and allows another app to grab its resources (sounds, images, etc)?
I want to create a lightweight app (app #1) and upload it to the app store. Then I would like to be able to direct users to download an add-on (app #2) if they want that contains more images and sounds. Then app #1 would read these resources from app #2.
I'm trying to avoid having my own server to serve these images, and just have the App Store handle this for me. I know I can do this on Android, and was wondering if it's possible in iOS as well.
Is it possible to create an app that does not appear in the Home
screen, and allows another app to grab its resources (sounds, images,
etc)?
Not only can you not create an app that's hidden from the user, you also can't access the resources of one app from another. Each app lives in its own sandbox and cannot read (or write) into the sandbox of another app.
I want to create a lightweight app (app #1) and upload it to the app
store. Then I would like to be able to direct users to download an
add-on (app #2) if they want that contains more images and sounds.
Then app #1 would read these resources from app #2.
The normal way to do something like that would be to host the resources you need on a server or just store them inside your app.
I'm trying to avoid having my own server to serve these images, and
just have the App Store handle this for me. I know I can do this on
Android, and was wondering if it's possible in iOS as well.
No, not possible.
If you are able to use the In-App Purchase system, then Apple will host this for you. From the docs, I'm not clear if this is iOS 6 only or is available for older versions (I haven't seen any reason it wouldn't work for older versions, but I haven't tried it).
Note that most iOS 6 specifics are under NDA, so please do not discuss them here until iOS 6 releases. This particular fact is public, however:
https://developer.apple.com/technologies/ios6/
https://developer.apple.com/appstore/in-app-purchase/index.html
https://itunesconnect.apple.com/docs/iTunesConnect_DeveloperGuide.pdf
No it's not possible. You have to setup an icon and it will be displayed on the iPhone springboard.
No it cannot, why do you need one?
Sadly No in IOS but in android this is possible.
There can exist an app without an icon. But it can still be managed or removed in "Manage Application" under settings.
This is required in scenarios, like say I want this app to alert user when he is going out of region, using GPS in the background. I do not want any icon nor any user interface.

Is there a neat way to tell if iPhone/iPad has been set a passcode by user

I have asked this question long before.
I know it maybe impossible, but as far as I know, 'Find my friends' has this features and it works just so well, so I wonder if now there is a neat and legitimate way of doing that.
Just because Apple's Find My Friends app has a feature does not mean the API is publicly available. If this app is not an enterprise app, you can't use private APIs and have your app put on the app store. If it is an enterprise app, you may want to look into setting up a configuration profile for the device. In order to access the VPN for my employer, I had to install a configuration profile (visible in Settings) that requires a passcode to be entered every time I unlock my iPad. Without that, I cannot VPN into their intranet. TestFlight uses a similar approach with profiles to register a device to receive builds. I would check out this link from Apple on setting up these sorts of profiles for enterprise applications: http://www.apple.com/iphone/business/resources/
There's no way to detect this programmatically from within an iPhone SDK-based application. If you need to, you should file an enhancement request with Apple at http://bugreporter.apple.com

Change iPhone settings from an app

Does anyone knows how to change the iPhone settings from interior of an app? For example: close the WiFi, disable 3G, change the sound volume and so on?
Apple is changing settings trough an app: Settings.app. It means that it's possible, I just don't know how.
Apple can do it in her Settings.app indeed.
Because of limitations of the iPhone SDK, some API's are not made public so you can't do everything Apple is able to do within her own OS. However, you can let the user adjust the main volume from your application, using the MPVolumeView class.
All applications written with the public SDK are sandboxed. They only have access to the properties and data which Apple deems feasible to use within that sandbox. Some of the examples you list are possible and some aren't.
Apple can perform these operations within their own applications since they don't use the public SDKs to write their applications - they use an internal SDK which has more functionality than the external one. They're not too worried about Apple employees hacking the phone and getting all your data off the phone.
Most of us wish that Apple could migrate more things to the public APIs (and they often do) but the reality is that the sandbox environment is carefully guarded. I wouldn't hold my breath to expect Apple to move all your examples over. You could always file a radar bug and let them know what you want - it's one way to have your voice heard.