Xcode + iOS + IOKit

Questions and Answers about all things *OS (macOS, iOS, tvOS, watchOS)

Xcode + iOS + IOKit

Postby vega01 » Mon Jan 02, 2017 4:45 pm

Hi,

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.
vega01
 
Posts: 19
Joined: Mon Sep 28, 2015 4:59 pm

Re: Xcode + iOS + IOKit

Postby vega01 » Mon Jan 02, 2017 5:25 pm

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.
vega01
 
Posts: 19
Joined: Mon Sep 28, 2015 4:59 pm

Re: Xcode + iOS + IOKit

Postby morpheus » Tue Jan 10, 2017 12:05 am

Forget the TBD - Copy the Headers from the MacOS SDK. It works when you use gcc-iphone script.
morpheus
Site Admin
 
Posts: 532
Joined: Thu Apr 11, 2013 6:24 pm


Return to Questions and Answers

Who is online

Users browsing this forum: No registered users and 1 guest

cron