Kiosk mode problems
Kiosk mode problems
- Subject: Kiosk mode problems
- From: Gabriel Zachmann via Cocoa-dev <email@hidden>
- Date: Sat, 4 Jul 2020 11:35:14 +0200
I am trying to add a kiosk mode to my macOS application.
However, I am running into problems.
First of all, when I add this code to my AppDelegate:
NSApplicationPresentationOptions presentationOptions =
(NSApplicationPresentationHideDock |
NSApplicationPresentationHideMenuBar |
NSApplicationPresentationDisableAppleMenu |
NSApplicationPresentationDisableProcessSwitching |
NSApplicationPresentationDisableForceQuit |
NSApplicationPresentationDisableHideApplication );
NSDictionary *fullScreenOptions = @{
NSFullScreenModeApplicationPresentationOptions: @(presentationOptions) };
[self.window.contentView enterFullScreenMode: [NSScreen mainScreen]
withOptions: fullScreenOptions ];
then I seem to be unable to get keystrokes (again).
It does not matter whether I put this code in -awakeFromNib or in
-applicationWillFinishLaunching or in -applicationDidFinishLaunching , I
always get the "Funk" sound.
When I switch to fullscreen just by calling [self.window toggleFullScreen: nil],
everything is fine,
except I don't have the kiosk mode precautions, like preventing the user from
switching to other apps.
Second problem I am facing is this:
I would like to allow users to quit the app, but only if they can authenticate
themselves.
There used to be an API (
https://developer.apple.com/documentation/security/authorization_services ),
but it is not available in a sandboxed app. (I don't get their reasoning, but
oh well ...)
Question is: is there any way to achieve that I want?
Any insights and hints will be highly appreciated.
Best regards, Gabriel
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden