Custom SFAuthorizationPluginView for Lock Screen

Hi,

I have a bundle with my custom lock screen which is a subclass of SFAuthorizationPluginView.

I have implemented :

override func view(for viewType: SFViewType) -> NSView?

and override func buttonPressed(_ inButtonType: SFButtonType),

as required in apple's documentation.

I have replaced the default UI in the system.login.screensaver.plist with my mchanism. (the custom plist is in the end of this post)

When I lock the screen, I get a black screen with the mouse hovering over. I can see in my logs that my view is loaded and the overriden function view(for viewType: SFViewType) is called.

When I change the authenticate.plist to display my custom UI, it is displayed properly. Why do I get a black screen when activating the lock screen, but do get my UI when authentication is needed?

What I am missing with the lock screen?

Here is the system.login.screensaver.plist:

################################################################## <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0">

<dict>

<key>class</key>
<string>evaluate-mechanisms</string>
<key>comment</key>
<string>The owner or any administrator can unlock the screensaver, set rule to &quot;authenticate-session-owner-or-admin&quot; to enable SecurityAgent.</string>
<key>created</key>
<real>711292439.260325</real>
<key>mechanisms</key>
<array>
	<string>MyBnndle:LockScreen</string>
</array>
<key>modified</key>
<real>717407094.6108691</real>
<key>shared</key>
<true/>
<key>tries</key>
<integer>10000</integer>
<key>version</key>
<integer>1</integer>

</dict> </plist> ##################################################################

cheers,

sivan

Creating authorisation plug-ins is tricky, especially those that use SFAuthorizationPluginView. I recommend that you open a DTS tech support incident so that I can help you one-on-one.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Custom SFAuthorizationPluginView for Lock Screen
 
 
Q