Confirm the following things:
1.Code
- (BOOL)blessHelperWithLabel:(NSString *)label error:(NSError **)error { BOOL result = NO; AuthorizationItem authItem = { kSMRightBlessPrivilegedHelper, 0, NULL, 0 }; AuthorizationRights authRights = { 1, &authItem }; AuthorizationFlags flags = kAuthorizationFlagDefaults | kAuthorizationFlagInteractionAllowed | kAuthorizationFlagPreAuthorize | kAuthorizationFlagExtendRights; AuthorizationRef authRef = NULL; OSStatus status = AuthorizationCreate(&authRights, kAuthorizationEmptyEnvironment, flags, &authRef); if (status != errAuthorizationSuccess) { NSLog(@"%@", [NSString stringWithFormat:@"Failed to create AuthorizationRef. Error code: %d", (int)status]); } else { result = SMJobBless(kSMDomainSystemLaunchd, (CFStringRef)label, authRef, (CFErrorRef *)error); } return result; }
2. Tools belonging after installation in the info.plist file (main application)
helper bundle : identifier <Helper Bundle Identifier> and certificate leaf[subject.CN] = "Developer ID Application: xxxxx (YYXSFDHZ6W)"
3. Clients are allowed to add and remove the tool field in the auxiliary info.plist.
item 0 : identifier <Main App Bundle Identifier> and certificate leaf[subject.CN] = "Developer ID Application: xxxxxx (YYXSFDHZ6W)"
4.Check MachServices registered in xxxxHelperTool-Launchd.plist.it should be
helper tool bundle : YES
source share