3

We are developing our Driver using DriverKit. In client App we successfully discover our driver but can't get IORegistry properties except IOClass. So in a client App we use following code to read properties:

    private func debugRegistry(device: io_object_t) {
        var dictionary: Unmanaged<CFMutableDictionary>?
        IORegistryEntryCreateCFProperties(device, &dictionary, kCFAllocatorDefault, .zero)
        if let dictionary = dictionary {
            let values = dictionary.takeUnretainedValue()
            print(values)
        }
    }

Output is:

{
    IOClass = IOUserService;
}

We tested same code on macOS and output contains about 20+ properties. It looks like IOKi doesn't allow to read other properties except IOClass.

Environment:

  • Xcode - Version 14.1 beta 2 (14B5024i).
  • iPadOS - iOS 16.1 (20B5050f)
pmdj
  • 22,018
  • 3
  • 52
  • 103
Myurik
  • 53
  • 2

0 Answers0