Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Build error with Unity 3D and Google Cardboard for iOS

I created a simple Unity project with Google Cardboard SDK iOS that I downloaded from GitHub. Everything is working perfectly in Unity editor, but once I build the file and try to run it in Xcode the build failed. I disabled Bitcode because I was getting a complier error asking me to ENABLE/DISABLE it. However this didn't solve the issue. Now when I try to build it from Xcode I get the following error instead:

Undefined symbols for architecture armv7: "_SecTrustEvaluate", referenced from: ___75-[GTMSessionFetcher URLSession:task:didReceiveChallenge:completionHandler:]_block_invoke651 in libvrunity.a(GTMSessionFetcher.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Environment:

Unity 5.3.2f1

Xcode 7.2 (7C68)

iOS 9.2.1 (iPhone 6S Plus)

Google Cardboard SDK for iOS

like image 236
Mikei Avatar asked Feb 07 '23 19:02

Mikei


1 Answers

_SecTrustEvaluate is part of the Security Framework on iOS and wouldn't be loaded when running in the Unity Editor. In the XCode project open the project view and select the tab 'Build Phases'. Towards the bottom of that view there is 'Link Binary With Libraries' at the bottom of which are two buttons + and -. Click the + button and from the list select 'Security Framework' and press Add. Once complete your project should build and run in XCode.

like image 88
Neil Dixley Avatar answered Feb 13 '23 06:02

Neil Dixley