Question

In my cocoa application, i am checking whether the drivers are installed in system.

Here is the code for checking driver installation

if (0 == system("lpstat -p MyDriver"))
{
   //Code inside if
}

it works fine and showing driver details without enabling sandbox. But after enabling sandbox, it shows lpstat: Invalid destination name in list "MyDriver" error.

And i found some reference System() command not working when enabling app sandboxing. In this reference, they are using password privillages to delete directory. but my scenario here is different, i'm just checking whether the drivers were installed or not.

Is there any solution to to check driver installation details if sandbox enabled.

Was it helpful?

Solution

Above given system commands works fine, after enabling allow printing option in Entitlements.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top