user3635384 user3635384 - 1 year ago 266
Swift Question

No such module error while importing GoogleCast framework in Swift project

I am developing an ios application using swift. Downloaded the google cast frame work from the below link mentioned.
Added this frame work in the application and imported like this:
import GoogleCast
But I am getting an error saying that "No Such module Google Cast"

Answer Source

I got something working in Swift.
I did not need to import anything.

Did you follow instructions from

And also configure Objective-C bridging header.

I put the location of file GoogleCast.h here

enter image description here

I tested this sample code:

    class ViewController: UIViewController, GCKDeviceScannerListener {

    var scanner = GCKDeviceScanner()!;

    func deviceDidComeOnline(device: GCKDevice!) {
        println("device found - \(device.friendlyName)");

    override func viewDidLoad() {
        // Do any additional setup after loading the view, typically from a nib.

        //scanner = GCKDeviceScanner();



I run this on an Iphone 5s from Xcode and it found my ChromeCast device:

device found - AW

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download