1

I've got an iPadOS project where I'm using a C++ class to work with devices connected via USB. This class uses IOServiceMatching among other methods.

I'm trying to convert the C++ class to Swift but when I'm try to use IOServiceMatching it doesn't find it, so I thought the problem would be importing the module IOKit

When I import it with import IOKit I get No such module IOKit

I know the framework is imported fine because I'm using it in C++ and the functionality in C++ works fine.

am I missing something?

xarly
  • 2,054
  • 4
  • 24
  • 40
  • You would need to manually add the framework to the project. And then you can follow this guide to create a bridging header: [Connect Objective-C framework to Swift iOS](https://stackoverflow.com/questions/24272184/connect-objective-c-framework-to-swift-ios-8-app-parse-framework) – Ranoiaetep Nov 29 '22 at 21:04
  • 2
    https://developer.apple.com/forums/thread/719564 – TylerP Nov 29 '22 at 21:49
  • Thanks, I don't know why this time I didn't think to look into apple developer forum. – xarly Nov 30 '22 at 08:52

0 Answers0