Google-signin: Getting very weird error about MSVC

Created on 10 Sep 2017  Â·  9Comments  Â·  Source: react-native-google-signin/google-signin

Hi guys,

I'm trying to compile a project that uses this library and I'm getting the following error.

In file included from /Users/chris/Projects/exampleapp/node_modules/react-native-google-signin/ios/RNGoogleSignin/RNGoogleSignin.m:1:
In file included from RNGoogleSignin/RNGoogleSignin.h:5:
In file included from /Users/chris/Projects/exampleapp/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTConvert.h:19:
In file included from /Users/chris/Projects/exampleapp/ios/build/Build/Products/Debug-iphonesimulator/include/yoga/Yoga.h:15:
../../../ios/Pods/leveldb-library/port/win/stdint.h:11:2: error: This file should only be included when compiling with MSVC.
#error This file should only be included when compiling with MSVC.

Any ideas?

💥 Bug ✅ Fixed - Next Release

Most helpful comment

if you are using Pod then update your pod file
Try pod 'GoogleSignIn' instead of pod 'Google/SignIn'.

All 9 comments

I'm getting this issue too.

I had the same issue recently with the Facebook SDK module, and I managed to solve it by manually updating the Xcode project for the module by scoping down the header search paths to avoid it looking for headers in all the Pods folders. For example:

Before:

HEADER_SEARCH_PATHS = (
    "$(inherited)",
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
    "${SRCROOT}/../../../ios/**",
);

After:

HEADER_SEARCH_PATHS = (
    "$(inherited)",
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
    "${SRCROOT}/../../../node-modules/react-native/**",
    "${SRCROOT}/../../../node-modules/react-native-fbsdk/**",
);

Hope that helps.

@gvillenave I'll have a go at that and if it solves the issue. Thanks

@gvillenave Unfortunately my HEADER_SEARCH_PARAM doesn't have anything similar to what you pasted.

"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-device-info/RNDeviceInfo",
"$(SRCROOT)/../node_modules/react-native-i18n/RNI18n",
"$(SRCROOT)/../node_modules/react-native-maps/lib/ios/**",
"$(SRCROOT)/../node_modules/react-native-sound/RNSound",
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-background-timer/ios",
"$(SRCROOT)/../node_modules/react-native-google-signin/ios/RNGoogleSignin/**",
"$(SRCROOT)/../node_modules/react-native-fbsdk/ios/RCTFBSDK/**",
"$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/**",
"$(SRCROOT)/../node_modules/react-native-fabric/ios/SMXCrashlytics",
"$(SRCROOT)/../node_modules/react-native-code-push/ios/CodePush/**",

check this! 😸

@christophervalles Sorry for the late response. The workaround in @PyYoshi 's link should work, but IMHO fixing the HEADER_SEARCH_PATHS is a less hacky solution. I think your issue here comes from the header search paths in the RNGoogleSignin project:

HEADER_SEARCH_PATHS = (
                    "$(inherited)",
                    "$(SRCROOT)/../../react-native/React/**",
                    "${SRCROOT}/../../../ios/**",
);

Try scoping it down like this:

HEADER_SEARCH_PATHS = (
                    "$(inherited)",
                    "$(SRCROOT)/../../react-native/**",
);

And see at build time if it's missing any other headers (potentially from Firebase?) and add each path individually.

if you are using Pod then update your pod file
Try pod 'GoogleSignIn' instead of pod 'Google/SignIn'.

I had the same issue. The suggestion from @gvillenave worked for me

This was fixed with #393

Was this page helpful?
0 / 5 - 0 ratings