Post not yet marked as solved
I used broadcast to send messages to client from kext.kev_msg:struct kev_msg msg = {0};
msg.vendor_code = vendor_code;
msg.kev_class = KEV_NETWORK_CLASS;
msg.kev_subclass = KEV_IOKIT_CLASS;kev_request:struct kev_request kevRequest = {0};
kevRequest.vendor_code = vendor_code;
kevRequest.kev_class = KEV_ANY_CLASS;
kevRequest.kev_subclass = KEV_SYSTEM_CLASS;Client can receive messages if you set it as above.Is subclass ignored?The more I want to know about the matching details of class and subclass.
There are four official offers scopes:1.Process Scope2.Generic Scope3.File Operation Scope4.Vnode ScopeI want to know when to use them and I need some scenarios to choose the right scope.
I know there are commands of defaults can set trackpad status.e.g:defaults write com.apple.AppleMultitouchTrackpad TrackpadCornerSecondaryClick -int 0But there are some problems:It needs to restart computer after executing the command line.System Preferences of Trackpad do not change status of checkbox.There are some settings that are not in the settings.These are not what I want.Is there some way to set it programmatically?Thanks.
Post not yet marked as solved
I have two applications to operate the same keychain item.App A save a key in keychain item and App B get the key from that keychain item.I know there are some solutions:"set trust list", but it doesn't work."allows all applications to access the item", but I don't know how to do with objc."keychain share", but my developer account is temporarily unavailable.First,I want to know why trust list of keychain not work?When App B want to get the key, it need to input login password, but it doesn't need when App A to get the key.There are some following codes: // save app
SecTrustedApplicationRef saveRef;
SecTrustedApplicationCreateFromPath([@"/Users/mr.zhang/Desktop/SaveKeychainInfo.app" cStringUsingEncoding:NSUTF8StringEncoding]
, &saveRef);
// get app
SecTrustedApplicationRef getRef;
SecTrustedApplicationCreateFromPath([@"/Users/mr.zhang/Desktop/GetKeychainInfo.app" cStringUsingEncoding:NSUTF8StringEncoding]
, &getRef);
SecAccessRef accessRef;
NSArray *trustList = @[(__bridge id)saveRef, (__bridge id)getRef];
SecAccessCreate((__bridge CFStringRef)@"access", (__bridge CFArrayRef)trustList, &accessRef);
NSDictionary *keychainQuery = @{
(__bridge NSString *)kSecClass : (__bridge NSString *)kSecClassGenericPassword,
(__bridge NSString *)kSecAttrService : service,
(__bridge NSString *)kSecAttrAccount : service,
(__bridge NSString *)kSecAttrAccess : (__bridge NSString *)accessRef,
};Second,I want to know how to "allows all applications to access the item" with code?I have no idea about it.Thanks
This is a mac app.When I first install this app, show a window to input login password.I allow it.When I uninstall this app and then install it again, that window will not show.I want to know how to revoke "aways allow"/"allow" of keychain access with objc.What should I do? Is there a place to store this permission operation?And I have another question:I need to store some key in default keychain.I want to store these key without input password when install app.What should I do?I have used the following APIs:SecItemAdd
SecItemCopyMatching
SecItemUpdate
SecItemDeleteThanks.
Hi,My mac app need to hide or disable the whole touchBar.What should I do to hide 'esc'?What should I do to hide 'the control strip'?What should I do to hide or disable the whole touchBar?I have read the following official documents:On the right side of the Touch Bar, the system supplies the always-available Control Strip. The Control Strip gives the user access to standard controls for display brightness, sound volume, Siri, and so on. Your app’s bars appear to the left of the Control Strip. The user can choose to hide the Control Strip, which gives the frontmost app the entire Touch Bar width. Read about how bars respond to available width in NSTouchBar Layout.But, I do not know how to implement it with objc.
Hi,My mac app need to hide or disable the whole touchBar.What should I do to hide 'esc'?What should I do to hide 'the control strip'?What should I do to hide or disable the whole touchBar?I have read the following official documents:On the right side of the Touch Bar, the system supplies the always-available Control Strip. The Control Strip gives the user access to standard controls for display brightness, sound volume, Siri, and so on. Your app’s bars appear to the left of the Control Strip. The user can choose to hide the Control Strip, which gives the frontmost app the entire Touch Bar width. Read about how bars respond to available width in NSTouchBar Layout.But, I do not know how to implement it with objc.
1.It is a macos's app with root permission.2.I want to write and read a generic password in other user's default keychain with invisable.But, it need to input login password or keychain's password to permission.What should I do to operate other user's default keychain without permission?I used the following methods:SecKeychainOpenSecKeychainItemCreateFromContentSecKeychainFindGenericPasswordSecKeychainItemDeleteBy the way, I just want to operation default keychain.