Skip to main content
Filter by
Sorted by
Tagged with
10 votes
2 answers
6k views

I'm trying to use IOHIDManager to get modifier key events because Cocoa flagsChanged events are lacking (difficult to differentiate between press/release, left/right if both are down, etc.) Here's the ...
dostende's user avatar
  • 253
4 votes
1 answer
3k views

I am unsure about how to set the com.apple.developer.driverkit.transport.usb key in my dext entitlements file. The Info.plist file already contains the IOKitPersonalities dictionary, and reading about ...
tuple_cat's user avatar
  • 1,396
2 votes
1 answer
383 views

My goal is to block keystrokes from reaching the OS using IOHID (Can't use CGEvent for other reasons). According to the docs of kIOHIDOptionsTypeSeizeDevice: Used to open exclusive communication with ...
JustMe's user avatar
  • 63
5 votes
1 answer
2k views

I am migrating a codeless KEXT to a codeless DEXT. I have watched the WWDC video and read much of the information on the Apple Developer site. The difficulty I am having is finding not what to do but ...
GTAE86's user avatar
  • 1,966
4 votes
3 answers
6k views

I have a simple question. How do I get iPhone's battery level? [UIDevice currentDevice] batteryLevel] Simple enough? However there is a little catch - I can't use UIKit. Here is what I wrote so far, ...
krb's user avatar
  • 16.4k
4 votes
1 answer
2k views

I have allocated memory in my application and passed its pointer and size to IOConnectCallStructMethod. Using IOMemoryDescriptor::CreateMapping I have then mapped this memory to the DriverKit system ...
tuple_cat's user avatar
  • 1,396
3 votes
1 answer
2k views

I am trying to subscribe to changes in power state on macOS. I discovered there is a way using IOKit, though it is a bit convoluted. I need to import it using #import <IOKit/ps/IOPowerSources.h> ...
Henrik's user avatar
  • 4,084
14 votes
4 answers
22k views

How do I get CPU temperature and fan speeds in OS X? I understand that information is obtained from IOHWSensor in IOKit, but I'm unable to find any reliable information on how to exactly do that....
Lajcik's user avatar
  • 306
7 votes
2 answers
4k views

I've now discovered how to hook/tap keyboard events on OS X at a low level: How to tap (hook) F7 through F12 and Power/Eject on a MacBook keyboard Printing out the code from that answer: // compile ...
P i's user avatar
  • 31.3k
4 votes
4 answers
17k views

I am trying to write a Cocoa program which detects iPods connected to Mac OS. I am listening to NSWorkspaceDidMountNotification and NSWorkspaceDidUnmountNotification for the USB device mount and ...
wantro's user avatar
  • 355
3 votes
1 answer
1k views

I am working on migrating a codeless KEXT to DriverKit. It is used to disable the IOKit HID driver for USB devices that present themselves as HID compliant in firmware upgrade mode. So far I have ...
Jonas Due Vesterheden's user avatar
3 votes
1 answer
2k views

I am trying to interact with a dext from an application. I am able to find the service using IOServiceOpen and I get a call to NewUserClient of my dext (I can see the type parameter passed being ...
tuple_cat's user avatar
  • 1,396
3 votes
2 answers
5k views

devs, as mentioned by Erica IOKit is a semi private framework; does anybody has any experience in using it in an app-store app? I want to use it to get IMEI and ICCID number.
Prashant Rane's user avatar
2 votes
2 answers
2k views

I am trying to learn more about DriverKit and memory management, and I read this question: How to allocate memory in a DriverKit system extension and map it to another process? And I would like to ...
ScottBraun's user avatar
1 vote
1 answer
2k views

I'm trying to get touch events in my application. So I used the IOHIDFamily callback to get the events. My code is like this: void handle_event(void* target, void* refcon, IOHIDServiceRef service, ...
Kevin Lee's user avatar
  • 282
34 votes
8 answers
10k views

We're working on a project with my colleagues which involves using a lot of private and non official code. This is not intended for AppStore use. The first and only requirement we have is to not use ...
Sergey Grishchev's user avatar
15 votes
4 answers
5k views

I did small app to allow quickly change screen resolutions on multiple monitors. I want to show product name as title of the monitor, and it's very simple to find using this code: NSDictionary *...
juniperi's user avatar
  • 3,783
11 votes
4 answers
9k views

I've been digging around in the kernel code repo for days, but I just can't find this anywhere. I want to disable/enable/detect the state of the ambient-light sensor based screen dimming that many of ...
peterjb's user avatar
  • 3,189
9 votes
4 answers
10k views

For an in-house application, we were using the following code UIDevice+serialNumber to get the device serial number. However, it seems that with iOS 8, the registry key "IOPlatformSerialNumber" is ...
quentinadam's user avatar
  • 3,162
7 votes
1 answer
7k views

I need to get CPU temperature using Swift, but I can't find any information except for this. I think that I should use IOKit.framework but again there's no much information about it.
Serhii K.'s user avatar
  • 679
7 votes
3 answers
8k views

I am trying to use some old IOKit functionality in a new Swift 4.0 Mac app (not iOS). I have created a bridging header to use an existing Objective C third party framework, DDHidLib, and I am current ...
user3746571's user avatar
5 votes
1 answer
8k views

I tried to add virtual usb device with driver in Mac OS programmatically. IOKit documentations says: Traditionally, drivers of virtual devices match on IOResources because virtual devices do not ...
Rofov Ivan's user avatar
5 votes
0 answers
292 views

I'm looking for a way to authenticate a macOS app that would allow the app to wake the user's Mac from sleep. I'm aware that I can schedule a power event to wake the computer using similar code to ...
mgwiggles's user avatar
  • 141
5 votes
2 answers
2k views

Recently I encountered this problem headachely, I've already spend one week on this issue, but still failed. Hopefully, you can help me to kick this stone away, many thanks. My Problem: Our compony ...
FlyingMan's user avatar
4 votes
2 answers
2k views

I am working on a requirement where i need to monitor changes in Thunderbolt port connection. (When Thunderbolt cable is connected or disconnected). I tried to use IOServiceMatching(...
Prashant's user avatar
  • 244