[swift-dev] Unable to use IOBluetooth framework with Swift 2.2

Matt Rajca matt.rajca at me.com
Thu Jan 14 14:43:50 CST 2016


Hello,

After installing the Swift 2.2 toolchain (and running it with Xcode 7.2), I found I am unable to compile any OS X projects that use the IOBluetooth framework. Namely, I get a “'IOBluetoothDevice' is ambiguous for type lookup in this context” error when merely trying to declare a variable of type `IOBluetoothDevice`:

import Cocoa
import IOBluetooth

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
	@IBOutlet weak var window: NSWindow!
	
	var device: IOBluetoothDevice?
	~~~~~~~~~~~~~~~~~~~~~~~~
}

This is a regression from Swift 2.1 and reproduces in a clean project with no other frameworks or source files beyond what’s in the code snippet above.

It’d be great if someone could look at this: https://bugs.swift.org/browse/SR-545

Thanks,

— Matt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160114/0d793f54/attachment.html>


More information about the swift-dev mailing list