Page 1 of 1

Xcode + iOS + IOKit

PostPosted: Mon Jan 02, 2017 4:45 pm
by vega01

I created a new Xcode project using iOS single view application. I'm using Xcode 8.2.1. The Base SDK is iOS 10.2 and the iOS Deployment Target is also iOS 10.2.
When I write
Code: Select all
import IOKit

it complains
    No such module 'IOKit'
So in Target's Build Phases tab I try to add IOKit from the list of frameworks under "+" in Link Binary With Libraries, but it's not there.

Is it possible to use IOKit with iOS in Xcode 8.2.1? I've noticed that there is only IOKit.tbd file included in the SDK's System frameworks directory.

Re: Xcode + iOS + IOKit

PostPosted: Mon Jan 02, 2017 5:25 pm
by vega01
It seems the tbd file is not enough. Also Xcode now forces the latest SDK and adding an older SDK seems not to be possible either.

Re: Xcode + iOS + IOKit

PostPosted: Tue Jan 10, 2017 12:05 am
by morpheus
Forget the TBD - Copy the Headers from the MacOS SDK. It works when you use gcc-iphone script.