ConnectSDK / Connect-SDK-iOS

iOS source project for Connect SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Breaks With GoogleCast SDK 2.10

steve228uk opened this issue · comments

Hello,

I'm getting the following issue when trying to build ConnectSDK with GoogleCast 2.10

Undefined symbols for architecture x86_64:
  "_CBCentralManagerOptionShowPowerAlertKey", referenced from:
      l005 in GoogleCast(GCKBLEDeviceVisibilityChecker.o)
      l085 in GoogleCast(GCKDeviceScanner.o)
  "_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
      l011 in GoogleCast(GCKBLEDeviceVisibilityChecker.o)
      l085 in GoogleCast(GCKDeviceScanner.o)
  "_OBJC_CLASS_$_CBCentralManager", referenced from:
      objc-class-ref in GoogleCast(GCKBLEDeviceVisibilityChecker.o)
      objc-class-ref in GoogleCast(GCKDeviceScanner.o)
  "_OBJC_CLASS_$_CBUUID", referenced from:
      objc-class-ref in GoogleCast(GCKBLEDeviceVisibilityChecker.o)
      objc-class-ref in GoogleCast(GCKDeviceScanner.o)
  "_OBJC_CLASS_$_MPMusicPlayerController", referenced from:
      objc-class-ref in GoogleCast(GNSAudioPlayer.o)
  "_OBJC_CLASS_$_MPVolumeView", referenced from:
      objc-class-ref in GoogleCast(GNSAudioPlayer.o)
  "_vDSP_vflt16", referenced from:
      l036 in GoogleCast(GNSAudioRecorder.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm not sure if the issue lies with ConnectSDK or with GoogleCast, however the example GoogleCast project does compile.

@steve228uk, looks like you need to link your app with CoreBluetooth.framework, MediaPlayer.framework, and Accelerate.framework.

Added those to both my app and the ConnectSDK project and still get the following + other issues when building ConnectSDK.

Undefined symbols for architecture x86_64:
  "_CBCentralManagerOptionShowPowerAlertKey", referenced from:
      l005 in GoogleCast(GCKBLEDeviceVisibilityChecker.o)
      l085 in GoogleCast(GCKDeviceScanner.o)
  "_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
      l011 in GoogleCast(GCKBLEDeviceVisibilityChecker.o)
      l085 in GoogleCast(GCKDeviceScanner.o)
  "_OBJC_CLASS_$_CBCentralManager", referenced from:
      objc-class-ref in GoogleCast(GCKBLEDeviceVisibilityChecker.o)
      objc-class-ref in GoogleCast(GCKDeviceScanner.o)
  "_OBJC_CLASS_$_CBUUID", referenced from:
      objc-class-ref in GoogleCast(GCKBLEDeviceVisibilityChecker.o)
      objc-class-ref in GoogleCast(GCKDeviceScanner.o)
  "_OBJC_CLASS_$_MPMusicPlayerController", referenced from:
      objc-class-ref in GoogleCast(GNSAudioPlayer.o)
  "_OBJC_CLASS_$_MPVolumeView", referenced from:
      objc-class-ref in GoogleCast(GNSAudioPlayer.o)
  "_vDSP_vflt16", referenced from:
      l036 in GoogleCast(GNSAudioRecorder.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

What do you mean by adding? Are you sure you linked them to your app (unnecessary to link with ConnectSDK)?

I've just tried this setup and the Sampler builds fine. Here's how it should look like:
screen shot 2015-11-28 at 10 34 02

Google Cast SDK now requires several more libraries. Compare https://github.com/CocoaPods/Specs/blob/master/Specs/google-cast-sdk/2.7.1/google-cast-sdk.podspec.json and https://github.com/CocoaPods/Specs/blob/master/Specs/google-cast-sdk/2.10.0/google-cast-sdk.podspec.json. When ConnectSDK's podspec is updated to use the new version, it should work out-of-box when installing from CocoaPods.

@steve228uk Please check https://developers.google.com/cast/docs/ios_sender for Google cast dependent frameworks & libraries

Thanks guys, that solved it. Will submit a PR to the Google Cast repo updating the readme if I get a second.