-1

We have a standalone video playback app, in which we have Chromecast working fine. Now we are trying to convert this app as a framework and add it in the parent app. While building framework, reference error pops up. If I comment out the code in RNGoogleCast.m, where these classes [see attached image] are referenced then the framework builds successfully and works fine with parent app. With commented code, I don't see the chromecast button while playing video.

In Build Setting of Framework, other linker flags set to -ObjC. If I remove it or keep the same value as an app, then frameworks build successfully but don't work with the parent app.

Please let me know if you need more information from the app or framework.

Can someone help me to get rid of these errors and get the chromecast button enabled while playing video?

Also, raised issue here: https://github.com/react-native-google-cast/react-native-google-cast/issues/126

enter image description here

Naren
  • 1,504
  • 16
  • 19

1 Answers1

1

Linker errors come when you're trying to use certain classes and the linker doesn't know where they come from. Chances are, you imported the correct header files, but you have not added linked frameworks/libraries that contain the GCK* classes.

To fix this issue, you should go to your project settings, then build phases. Open the dropdown menu "Link Binary With Libraries", and from here you can click the plus to add the framework/library. In your case, I believe it's GoogleCast.framework. With Cast, there are a few extra steps listed here: https://developers.google.com/cast/docs/ios_sender

Tanner H.
  • 304
  • 1
  • 13