0

I am trying to implement Chromecast feature in my iOS Swift app, which also has Facebook SDK used. For Facebook SDK I used bridging header. I did following things:

  1. I've downloaded Googlecast iOS Sender SDK and I pasted it inside my project's root folder
  2. I've set the Other Linker Flags in Build Settings to: -ObjC -lc++
  3. I've added the following framework libraries (linked, not embedded): Accelerate.framework AudioToolbox.framework AVFoundation.framework CoreBluetooth.framework CoreGraphics.framework CoreText.framework Foundation.framework MediaAccessibility.framework MediaPlayer.framework MediaToolbox.framework QuartzCore.framework SystemConfiguration.framework UIKit.framework
  4. Still under Linked framework libraries I've added GoogleCast.framework clicking on + -> Add Other... ->GoogleCast.framework
  5. I've added in the Build Phases of target a new entry in the Copy Bundle Resources section. I selected Add Other GoogleCast.framework -> Resources -> GoogleCastResources.bundle.

Now I am not able to compile my project. It gives error. If I try to import Google cast header file in bridging header, it throws error Google/GoogleCast.h file not found.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Enmud
  • 83
  • 1
  • 1
  • 9

1 Answers1

0

I think the best option would be to use CocoaPods to manage your libraries. It will help you to quickly setup a working project with these dependencies.

In your case, your PodFile would be something like:

target 'MyApp' do
  pod 'google-cast-sdk', '~> 3.1'
  pod 'Facebook-iOS-SDK', '~> 4.1'
end

You can take a look at the Getting Started of Cocoapods.

Julien Quere
  • 2,407
  • 16
  • 21
  • Thanks for your response. You saved my day. I am able import header files. I am using [https://github.com/googlecast/CastHelloText-ios/blob/master/HelloTextGoogleCastSwift/ViewController.swift ] for casting. I can find the device(in logs) but device manger object shows nil (line 64)hence when I click on cast icon it says "Please connect to cast device". From same iphone I can cast youtube. – Enmud Aug 16 '16 at 13:50
  • You're welcome. Since it's not the same issue as your original question (it was about library import), you’d better create a new question. So, it will be easier for us to help you. If your original issue is solved, don't hesitate to mark it as "solved." – Julien Quere Aug 16 '16 at 14:03