Hello,
We are trying to develop an application, which is like a custom installer app, where it asks for certain user input or performs certain checks before the actual package in run.
As the package needs to be run as sudo or with priviliges , (using NSTask with sudo is giving error that needs ask pass).
So using AuthorizationExecuteWithPrivileges to perform install pkg using /usr/sbin/Installer. This works .
But the documentation says AuthorizationExecuteWithPrivileges is deprecated and also console has a message
AuthorizationExecuteWithPrivileges and AuthorizationExecuteWithPrivilegesExternalForm are deprecated and functionality will be removed soon - please update your application
What is the replacement API or approach to install a pkg from a user launched app.
The deprecation Notes says Deprecated
Use a launchd-launched helper tool and/or the Service Management framework for this functionality.
But how to use this for installation case?
We are trying to develop an application, which is like a custom installer app, where it asks for certain user input or performs certain checks before the actual package in run.
As the package needs to be run as sudo or with priviliges , (using NSTask with sudo is giving error that needs ask pass).
So using AuthorizationExecuteWithPrivileges to perform install pkg using /usr/sbin/Installer. This works .
But the documentation says AuthorizationExecuteWithPrivileges is deprecated and also console has a message
AuthorizationExecuteWithPrivileges and AuthorizationExecuteWithPrivilegesExternalForm are deprecated and functionality will be removed soon - please update your application
What is the replacement API or approach to install a pkg from a user launched app.
The deprecation Notes says Deprecated
Use a launchd-launched helper tool and/or the Service Management framework for this functionality.
But how to use this for installation case?