Hi there, I am a fresher apple developer. I am developing a software for eduction field, so that i need a kiosk mode in my application for restricting the students within the application only.
I am trying to do like this:
func KioskMode(){
let presOptions: NSApplication.PresentationOptions = [
.hideDock
// .autoHideMenuBar, // Menu Bar appears when moused to.
// .disableAppleMenu, // All Apple menu items are disabled.
// .disableProcessSwitching, // Cmd+Tab UI is disabled. All Exposé functionality is also disabled.
// .disableForceQuit, // Cmd+Opt+Esc panel is disabled.
// .disableSessionTermination, // PowerKey panel and Restart/Shut Down/Log Out are disabled.
// .disableHideApplication, // Application "Hide" menu item is disabled.
// .autoHideToolbar,
// .fullScreen
]
let optionsDictionary = [NSView.FullScreenModeOptionKey.fullScreenModeApplicationPresentationOptions: presOptions]
ExamFullPage.contentView?.enterFullScreenMode(NSScreen.main!, withOptions: optionsDictionary)
}
@IBAction func EnterKioskByBtn(_ sender: Any) {
KioskMode()
}
It is working but the problem is, it is never closing. I want to close the app after some time interval. When the timer stops the app will close autometically or when i press a button it will disable all kiosk activities and bring it back to the normal mode.
Can anybody help mo to find the solution.