How to lock down user to Single App mode in iOS 6, Programmatically?
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.
How to kill an iOS app running in Single app mode everyday at a specific time?
exit(0)
is the code to kill your app programatically. How you do it is at a particular time or event is left upto you. You can send a push notification and kill the app on the push notification or a local notification which is fired at a particular time.
While as for starting up an app it is not possible unless it be for VOiP apps which are brought into foreground directly in case of an incoming call.
Hope this helps and clear out your doubts.
Happy Coding!
Please refer these SO Post 1, SO Post 2, Restarting App.
But using exit(0) would lead to app rejection on AppStore.
How to kill an iOS app running in Single app mode everyday at a specific time?
exit(0)
is the code to kill your app programatically. How you do it is at a particular time or event is left upto you. You can send a push notification and kill the app on the push notification or a local notification which is fired at a particular time.
While as for starting up an app it is not possible unless it be for VOiP apps which are brought into foreground directly in case of an incoming call.
Hope this helps and clear out your doubts.
Happy Coding!
Please refer these SO Post 1, SO Post 2, Restarting App.
But using exit(0) would lead to app rejection on AppStore.
How can I programmatically enable Guided Access (Kiosk mode) on an iPhone?
You can enter and exit guided access mode from within your app. However, to do so the device has to be supervised, and have an MDM profile installed that has the app's bundle ID in the list of applications that can request guided access mode (the key is autonomousSingleAppModePermittedAppIDs
.
Once that is done, to enter guided access you do this:
UIAccessibility.requestGuidedAccessSession(true){
success in
print("Request guided access success \(success)")
}
Related Topics
Add Uiview Banner Above Status Bar iOS 7
Is It Safe to Delete SQLite's Wal File
Uisearchdisplaycontroller - How to Preload Searchresulttableview
Customize Navigation Bar with Title View
Ios/Swift - Hide/Show Uitabbarcontroller When Scrolling Down/Up
Zip and Unzip a File Programmatically in iOS
Uitapgesturerecognizer Programmatically Trigger a Tap in My View
How to Add a Credit/Debit Card into Apple Wallet from the iOS App
How to Get Previous and Next Month in Calendar-Swift
Xcode 4.3:Missing Icons for iOS Apps in Organizer's Archives
Calayer - Cabasicanimation Not Scaling Around Center/Anchorpoint
Move Xcode Project Causes Red Text (Missing Files from Project)
Swift: Custom Camera Save Modified Metadata with Image
Full Resolution Screenshots for iPhone 6 and 6+