Failed to open HID Device

Hello!

After updating my devices to iOS to 13.1 I've started to receive "IOServiceOpen failed: 0xe00002e2"in my swift project while connecting USB HID Device to my iPhone. This not good, because IOService is a part of kernel framework and I really need it. What should I do? Is it a bug or a feature of new iOS version?

Replies

IOService
is a part of kernel framework and I really need it.

Are you calling I/O Kit yourself? If not, what API are you calling that triggers this message?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Yes, I'm calling I/O Kit myself.

Yes, I'm calling I/O Kit myself.

I’m sorry to be the bearer of bad news here, but I/O Kit is not a supported API on iOS. It sounds like the iOS sandbox has been updated to prevent you from doing thing that you shouldn’t have been doing in the first place.

iOS supports many HID devices out of the box using high-level APIs, so you may be able to do what needs doing with those. Can you post more details about your goals here?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I have a specific HID device which was made for medical usage. It is certified in my country as medical device and has been selling almost worldwide for a several years. Few years ago I'm stuck with a problem of iOS 10.0 support for a while but successfully solved this some time later. Almost we(my company) tried to certify our device as MFi-device but people in Apple said that we don't need to do that. Maybe something changed and we could do that or could do something else? I could write a driver and send it to yours' I/O Kit developers. I even could send you a device itself! I really hope that we can solve this problem someway.

Unfortunately there’s nothing I can do to help out here. With regards MFi, I’m not involved in the MFi programme and thus can’t comment on that side of things. It might make sense for to raise this with the MFi folks again.

With regards supporting the device directly in iOS, my only advice is that you file an enhancement request with the details.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thank you very much! I'll try all of this.

Wanted to add to this thread... as it's affecting something I'm working on presently (Nov 2022)

It appears that use of this method is officially tolerated by iOS again as of iOS 16.

docs

IOServiceOpen is now available on iOS (well, iPadOS) as part of the DriverKit effort. However, it’s only intended to be used to access DriverKit services. Those have their own access control mechanism, based on entitlements [1]. This does not, however, change the story for non-DriverKit services.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] That in itself is a complex topic, because it works differently on macOS and iPadOS. See the user client stuff in the Entitlements group on the main DriverKit page.