SMJobBless 関数を使用してアプリケーションを認証しようとしましたが、/Library/Fonts に書き込むことができますが、機能しません。
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];
}
私のアプリケーションは「Job is available」と出力しましたが、/Library/Fonts に対する権限の書き込みを確認すると、結果は false です
理由を教えて解決してください。