osx - Shell Script from Objective c -


how can run following command objective using nstask,

pluginkit -e ignore -i com.xxxxx.plugin_id

i tried not worked,

nstask *task = [[nstask alloc] init];     [task setlaunchpath:@"/bin/sh"];    [task setarguments: @[@"pluginkit",@"-e",@"ignore",@"-i",@"com.xxxxx.plugin_id"]];     [task launch]; 

setlaunchpath should binary launching. pluginkit located on /usr/bin/, launch code should think:

nstask *task = [[nstask alloc] init]; [task setlaunchpath:@"/usr/bin/pluginkit"]; [task setarguments: @[@"-e", @"ignore", @"-i", @"com.company.pluginid"]]; [task launch]; [task waituntilexit]; 

or single lined call:

system("pluginkit -e ignore -i com.company.pluginid"); 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -