junyu junyu - 1 year ago 86
iOS Question

Using Unity to build this ios project, Added google signin SDK 4.0.1 Framework, I get error

I want google login in my app so i want to write unity plugin ,but i do not wanna use Play Games Unity plugin.

So I follow this tutorial (https://developers.google.com/identity/sign-in/ios/sdk/).

But after I have added the framework,I get error message.

My tool version


  1. Unity 5.6.0f3

  2. Xcode 8.3.1

  3. Google Sign-In SDK 4.0.1



Xcode Builld error message

ld: warning: arm64 function not 4-byte aligned: ltmp0 from /Users/user/unityWorkspace/GoodTest2/NOgpgs/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/user/unityWorkspace/GoodTest2/NOgpgs/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
"_kSecValueData", referenced from:
-[GTMOAuth2Keychain setPassword:forService:accessibility:account:error:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_SecTrustEvaluate", referenced from:
___70+[GTMSessionFetcher evaluateServerTrust:forRequest:completionHandler:]_block_invoke in GoogleSignInDependencies(GTMSessionFetcher_28beddf8a47a0abe7f4eaa9a5c9cb75b.o)
"_kSecAttrAccessible", referenced from:
-[GTMOAuth2Keychain setPassword:forService:accessibility:account:error:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_SecItemAdd", referenced from:
-[GTMOAuth2Keychain setPassword:forService:accessibility:account:error:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_SecItemDelete", referenced from:
-[GTMOAuth2Keychain removePasswordForService:account:error:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_kSecReturnData", referenced from:
-[GTMOAuth2Keychain passwordForService:account:error:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_kSecClass", referenced from:
+[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_SecItemCopyMatching", referenced from:
-[GTMOAuth2Keychain passwordForService:account:error:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_kSecAttrGeneric", referenced from:
+[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly", referenced from:
+[GTMOAuth2ViewControllerTouch saveParamsToKeychainForName:accessibility:authentication:error:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_kSecMatchLimitOne", referenced from:
-[GTMOAuth2Keychain passwordForService:account:error:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_kSecAttrService", referenced from:
+[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_kSecClassGenericPassword", referenced from:
+[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_kSecRandomDefault", referenced from:
-[GIDSignIn randomString] in GoogleSignIn(GIDSignIn.o)
"_kSecAttrAccount", referenced from:
+[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_kSecMatchLimit", referenced from:
-[GTMOAuth2Keychain passwordForService:account:error:] in GoogleSignInDependencies(GTMOAuth2ViewControllerTouch_5e9c07ce1f20710c59c1499209a8b99a.o)
"_SecRandomCopyBytes", referenced from:
-[GIDSignIn randomString] in GoogleSignIn(GIDSignIn.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


When I googled about it , I found that it seems like something about arm64 support of Google Sign-In SDK.

I have set scripting backend on Unity to IL2CPP, and target architecture to Universa(both armv7 and arm64).
Now I have no Idea to resolve these errors.

Answer Source

Is Missing Security.framework. Now! It working.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download