Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to write on /Library/Fonts folder on Mac with SMJobBless function #4

Open
pvagithub opened this issue Aug 5, 2013 · 0 comments

Comments

@pvagithub
Copy link

0
down vote
favorite
I try to use SMJobBless function to authenticate for my application can do write on /Library/Fonts but not working,

if (![self blessHelperWithLabel:@"com.apple.bsd.SMJobBlessHelper" error:&error]) {
NSLog(@"Something went wrong! %@ / %d", [error domain], (int) [error code]);
} else {
//Access to this point.
/* At this point, the job is available. However, this is a very
* simple sample, and there is no IPC infrastructure set up to
* make it launch-on-demand. You would normally achieve this by
* using XPC (via a MachServices dictionary in your launchd.plist).
*/
NSLog(@"Job is available!");
bool result = false;
result = [[NSFileManager defaultManager] isWritableFileAtPath:@"/Library/Fonts"];
[self->_textField setHidden:false];
}
My application printed "Job is available" but when i check authorities write on /Library/Fonts, result is false
Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant