Hello, forum, I'm trying to build connection between a non-MFi HID device (like keyboard) and iOS app with IOKit and Swift.
Thanks to this post, I have manage to import the IOKit into objc header.
#import <IOKit/IOKitLib.h>
However, I have this compiler error when I try to imitate same methods in the SerialPortSaple project from following article, but the IOKit
can not be imported to Swift at first place.
Communicating with a Modem on a Serial Port
The screen shot of the sample project:
It looks like the complier unable to reach the io_object_t
type somehow, is there any workaround or approach?
I/O Kit on non-Mac platforms is only rated for talking to a DriverKit driver. You can’t use it to talk to generic hardware. Moreover:
-
DriverKit is only supported on iPadOS, not iOS.
-
The DriverKit driver controls whether your app can use it, via the entitlements listed here.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"