Google-signin: RNGoogleSignInButton.h - GoogleSignIn/GoogleSignIn.h file not found

Created on 20 Jan 2019  路  12Comments  路  Source: react-native-google-signin/google-signin

Hi!
I try to migrate my project from v1.0.0-rc7 by following all the steps for iOS (without cocoapod).
I unlink the lib, upgrade to latest version (1.0.2), re-link the lib, use the latest sdk, etc.

But I've got an error at build

Lexical or Preprocessor Issue Group
/RNGoogleSignin/RNGoogleSignInButton.h:1:9: 'GoogleSignIn/GoogleSignIn.h' file not found



md5-83d4d1fcaec592da56f30545f06945fe



/path-to/my-project/node_modules/react-native-google-signin/ios/RNGoogleSignin/RNGoogleSignInButton.m:2:9:
In file included from
/path-to/my-project/node_modules/react-native-google-signin/ios/RNGoogleSignin/RNGoogleSignInButton.m:2:

All previous issues I found about it seems to be related to a missing path in Header Search Paths in Build Settings, but I've got the correct one $(SRCROOT)/../node_modules/react-native-google-signin/ios/RNGoogleSignin (non-recursive).
And others issues doesn't seems to be related to the RNGoogleSignInButton

In Build Settings I've got the good path in Framework Search Paths.
In Build Phases I've got RNLibGoogleSignin.a, GoogleSignIn.framework, GoogleSignInDependencies.framework in Link Binary With Libraries and GoogleSignIn.bundle in Copy Bundle Resources.

In AppDelegate.m I try the old #import "RNGoogleSignin.h" and the new #import <RNGoogleSignin/RNGoogleSignin.h> but this doesn't change the result.

I don't think I can provide a reproduction of a migration. Based on the issue can you suggest a potential issue ? Did you need more informations on a specific part ?
Thank's

Environment

  • react-native : 0.57.8
  • react-native-google-signin : 1.0.2
  • cocoapods and GoogleSignIn pod version (if applicable) : Google Sign-In SDK 4.4.0

Most helpful comment

Same here!!

All 12 comments

Same here!!

Same here!!, i am also getting same error with xcode 10

I encountered the same error and was able to fix it.

It looks like the 1.0.2 removed some frameworks and a bundle that had been located in node_modules/react-native-google-signin/ios. When I inspected the "Link Binary with Libraries" build phase there were a lot of missing frameworks, including GoogleSignIn.framework which I think is what was causing the missing header error.

I'm using pods to install the Google sign-in SDK, so I found the framework there. Yours may be somewhere else. Note that I also had to remove GoogleSignIn.bundle from the "Copy Bundle Resources" phase.

Also having this issue using the non-cocoapods install on 1.02. Anyone solved this yet?

@peterholcomb I had this problem with non-cocoapods install on 1.10.

I've done a workaround base on how Facebook's SDK handles framework location.

To resolve this, I had to add a Framework Search Path to the location where I put my Google Frameworks (for me it is ~/Document/GoogleSDK) in the RNGoogleSignIn.xcodeproj in my project.

Just point to the folder where the GoogleSignIn.framework and GoogleSignInDependencies.framework sit.

screen shot 2019-02-12 at 10 36 38 am

Here's what i did to resolve this issue :
-Copy GoogleSignIn.framework and GoogleSignInDependencies.framework to ../node_modules/react-native-google-signin/ios
-remove googlesignin.bundle from copy bundle resource
-remove googlesignin.framework and googlesignindependencies.framework from framework folder, thus unlinking it from binary resource.

I did a workaround like @simonso3 -- with a post-install script that makes sure the Frameworks/Header paths are correct for my custom location for those Frameworks

I did a workaround like @simonso3 -- with a post-install script that makes sure the Frameworks/Header paths are correct for my custom location for those Frameworks

@fbartho What is in your post-install script?

Someone with conflict with react-native-firebase? No one workaround works for me for an app with [email protected]

I mount a clean app to reproduce this issue with my environment.

https://github.com/lucianomlima/react-native-google-signin-example

Hi, I may have a fix for non cocoapods installs. I think the expected GoogleSigin framework location was long, I made a PR643

had the same issue and when I installed using cocoapods everything worked fine.

this should be fixed in v1.2.3

please open a new issue if the problem persists, thanks.

Was this page helpful?
0 / 5 - 0 ratings