react-native-google-cast: iOS build fails with: 'GoogleCast/GoogleCast.h' file not found

Hello, I recently had this library start failing to build on iOS when included in my project. I have tried reinstalling, relinking, etc.

I have tried both 'google-cast-sdk', '2.10.4.1' and 'google-cast-sdk' in my podfile. I’ve tried manually adding the $(SRCROOT)/../node_modules/react-native-google-cast/ios path to the header search paths in Build Settings, and I even tried to manually add the GoogleCast.h and GoogleCast.m files into my project as mentioned in issue #21.

I also cloned a fresh copy of the repo from here and tried the example project in both the master branch and 1.3.0 branch. In every single one of these circumstances I get the following error:

/Users/chris/Desktop/react-native-google-cast/ios/GoogleCast.h:2:9: fatal error: 'GoogleCast/GoogleCast.h' file not found
#import <GoogleCast/GoogleCast.h>
        ^
1 error generated.

Any more ideas to try? I’m running out… Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 15 (3 by maintainers)

Commits related to this issue

Most upvoted comments

Here’s how to fix that:

In the xcode project navigator, open Libraries/GoogleCase.xcodeproj Choose the GoogleCast target, and Build Settings Add the following to “Framework Search Paths”: $(PROJECT_DIR)/…/…/…/ios/Pods/google-cast-sdk/GoogleCastSDK-2.10.4-Release

Hey, @petrbela. I got it compiling by adding: $(SRCROOT)/…/…/…/ios/Pods/google-cast-sdk to the framework search paths and header search paths.

The only solution which worked for me was to manually replace all the sdk Headers/* (~20 files) like

#import <GoogleCast/GCKApplicationMetadata.h>

to

#import "Pods/google-cast-sdk/GoogleCastSDK-2.10.4-Release/GoogleCast.framework/Headers/GCKApplicationMetadata.h"

etc

@lulirl This is an old thread around an outdated version of the library. You might want to open a new issue with details of your specific case. Btw looking at the error, it seems your issue might not be with this library but with DoubleConversion instead.

Could not get this fixed even by adding: $(SRCROOT)/…/…/…/ios/Pods/google-cast-sdk to the paths. Any other ideas?