trilemma-dev / SecureXPC

A simple and secure XPC framework for Swift
MIT License
75 stars 15 forks source link

Load `xpc_connection_get_audit_token` only once #40

Closed jakaplan closed 2 years ago

jakaplan commented 2 years ago

Factors out the loading of xpc_connection_get_audit_token so it only happens once per process lifetime

Also changes to the function loading to either succeed or raise a fatalError as there's no expectation this will ever fail on the pre-11.0 versions of macOS this code runs on.

jakaplan commented 2 years ago

@amomchilov as discussed, here's the follow up PR