Giter VIP home page Giter VIP logo

Comments (8)

tmaly1980 avatar tmaly1980 commented on May 28, 2024 7

@joonhocho You say in the documentation to NOT use the POD.... So where does GoogleSignIn/GoogleSignIn.h come from? I see it in GoogleSignIn.framework, but am not sure why it's not showing up. I get the GoogleSignIn/GoogleSignIn.h file not found error.

from react-native-google-sign-in.

peeyush1234 avatar peeyush1234 commented on May 28, 2024 3

@joonhocho I had the same issue of GoogleSignIn/GoogleSignIn.h file not found. I was getting this error because I did not add the path of google_signin_sdk_4_X_X to "Framework Search Paths" settings inside "Build Settings" of the project. After adding the path, the project build succeeded.

from react-native-google-sign-in.

cloudle avatar cloudle commented on May 28, 2024 1

@jinxac, not really sure about it, but you could check (you're very likely forget number 3):
1. Make sure your pod is up to date with latest

pod 'GoogleSignIn'

2. Double check your [app?]-Bridgin-Header.h file - should look like this:

#ifndef app_Bridging_Header_h
#define app_Bridging_Header_h

#import <React/RCTBridgeModule.h>
#import <React/RCTViewManager.h>
#import <React/RCTEventEmitter.h>
#import <GoogleSignin/GoogleSignIn.h>

#endif /* app_Bridging_Header_h */

3. Did you forget to add is in the end of your AppDelegate.m?:

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
  BOOL handled = [[GIDSignIn sharedInstance] handleURL:url
                                     sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
                                            annotation:options[UIApplicationOpenURLOptionsAnnotationKey]];
  return handled;
}

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation {
  if ([[GIDSignIn sharedInstance] handleURL:url
                          sourceApplication:sourceApplication
                                 annotation:annotation]) {
    return YES;
  }
  return YES;
}

from react-native-google-sign-in.

cloudle avatar cloudle commented on May 28, 2024

I have the same problem.. on iOs.. by the way, the link to article "create Swift Bridging Header" is broken (that page not work anymore)..

from react-native-google-sign-in.

cloudle avatar cloudle commented on May 28, 2024

Hey @xralphack, have a look at #43.. that one saved my life ;)

In summary, the GoogleSignIn pod was updated, so.. we'll need to:

  1. Change #import <Google/SignIn.h> => #import <GoogleSignin/GoogleSignIn.h>

  2. Change the config in didFinishLaunchingWithOptions to:

NSString *filePath = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
NSDictionary *plistDict = [NSDictionary dictionaryWithContentsOfFile:filePath];
[GIDSignIn sharedInstance].clientID = [plistDict objectForKey:@"CLIENT_ID"];

from react-native-google-sign-in.

salujaharkirat avatar salujaharkirat commented on May 28, 2024

I am getting error Use of undeclared identifier 'GIDSignIn' after making the above changes. Any help please?

from react-native-google-sign-in.

andreecy avatar andreecy commented on May 28, 2024

After changing to new GoogleSignIn Pod, I am still getting error 'GoogleSignIn/GoogleSignIn.h' file not found in AppDelegate.h
could someone help me please?

from react-native-google-sign-in.

joonhocho avatar joonhocho commented on May 28, 2024

@andreecy @cloudle @jinxac @xralphack
Just upgraded to the latest Google SignIn SDK for iOS. (npm version 1.0.16)
Please follow new instructions carefully.
https://github.com/joonhocho/react-native-google-sign-in#ios
Also refer to ExampleApp if something is not working. I've tested ExampleApp and is working fine.
Feel free to reopen this issue if you cannot get it working.

from react-native-google-sign-in.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.