I am trying to log touch events in the background using IOKit framework in iOS 14+. I followed the code in the accepted answer for this question.
The problem is that the callback function is not called with any touch events. I am only getting temperature, proximity and vendor defined events.
Is it still possible to capture touch events with these APIs? Are there any alternative methods to collect touch events in the background?
Note: I am not planning to submit an app on the store, only using it for research purposes. I am testing on iPhone Xs running iOS 15.1 not jailbroken.