Google-signin: Undefined symbols for architecture x86_64:

Created on 4 Sep 2017  路  6Comments  路  Source: react-native-google-signin/google-signin

iOS build failed:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_GIDSignIn", referenced from:
      objc-class-ref in libRNGoogleSignin.a(RNGoogleSignin.o)
  "_OBJC_CLASS_$_GIDSignInButton", referenced from:
      objc-class-ref in libRNGoogleSignin.a(RNGoogleSigninButtonManager.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

package.json

{
    "name": "DemoKiller",
    "version": "0.0.1",
    "private": true,
    "scripts": {
        "start": "node node_modules/react-native/local-cli/cli.js start",
        "test": "jest"
    },
    "dependencies": {
        "expo": "^20.0.0",
        "firebase": "^4.3.0",
        "lodash": "^4.17.4",
        "react": "16.0.0-alpha.12",
        "react-native": "0.47.2",
        "react-native-deprecated-custom-components": "^0.1.1",
        "react-native-gifted-chat": "^0.2.7",
        "react-native-google-signin": "0.10.0",
        "react-native-router-flux": "^4.0.0-beta.21",
        "react-native-vector-icons": "^4.3.0",
        "react-navigation": "^1.0.0-beta.11",
        "react-redux": "^5.0.6",
        "redux": "^3.7.2"
    },
    "devDependencies": {
        "babel-jest": "20.0.3",
        "babel-preset-react-native": "3.0.1",
        "jest": "20.0.4",
        "react-test-renderer": "16.0.0-alpha.12"
    },
    "jest": {
        "preset": "react-native"
    },
}

Most helpful comment

fixed by

pod 'Google/SignIn'

All 6 comments

fixed by

pod 'Google/SignIn'

If you choice manual install, without pods:

  1. react-native install react-native-google-signin
  2. Drag and drop all files from /node_modules/react-native-google-signin/ios/GoogleSdk directory that end with .framework into the Frameworks group of application and check "Copy items if needed" is ticked.
  3. Go to "Build Settings" and add to "Framework Search Paths" path to GoogleSdk: default $(PROJECT_DIR)/../node_modules/react-native-google-signin/ios/GoogleSdk
  4. Now try to build your application again

@akyGit Any other solution to it?
I am getting, this

  "_OBJC_CLASS_$_GTMOAuth2Authentication", referenced from:
      _OBJC_CLASS_$_GIDGTMOAuth2AuthenticationWithEMMSupport in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
      objc-class-ref in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
      objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
  "_OBJC_CLASS_$_GTMOAuth2Keychain", referenced from:
      objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
  "_OBJC_CLASS_$_GTMOAuth2SignIn", referenced from:
      objc-class-ref in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
      objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
  "_OBJC_CLASS_$_GTMOAuth2ViewControllerTouch", referenced from:
      objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
  "_OBJC_METACLASS_$_GTMOAuth2Authentication", referenced from:
      _OBJC_METACLASS_$_GIDGTMOAuth2AuthenticationWithEMMSupport in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
  "_kGTMOAuth2ErrorJSONKey", referenced from:
      +[GIDAuthentication handleTokenFetchEMMError:completion:] in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
     (maybe you meant: _GSDK_kGTMOAuth2ErrorJSONKey)

I had this issue.
Google SDK 4.4.0
RN 0.57.8
"react-native-google-signin": "1.0.0-rc7",

I have same Issue? How can you solve it?

Solved this issue with pod.

  1. remove your googleSignIn.bundle from Xcode-->build phases-->copy bundle resources
  2. go to your xcode project
  3. pod init
  4. open Podfile and add pod 'GoogleSignIn', save the file and exit
  5. pod install
  6. go back to your root project folder
  7. react-native run-ios
Was this page helpful?
0 / 5 - 0 ratings