Google VR Unity SDK Native Cardboard iOS build fails due to Cocoa Pods

It is currently impossible to use Unity Cloud Build to build an app for iOS that uses the native Cardboard VR SDK, when the Google VR Unity SDK (any recent version, tested with 1.5.0) is included in the project.

The following linker errors related to Cocoa Pods packages are returned by Unity Cloud Build:

[xcode] ld: warning: directory not found for option ‘-L/BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos/GTMSessionFetcher’
[xcode] ld: warning: directory not found for option ‘-L/BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos/GoogleToolboxForMac’
[xcode] ld: library not found for -lGTMSessionFetcher
[xcode] clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is there any timeline when Cocoa Pods will work properly and by extension building Cardboard apps for iOS will be fixed?

3 Likes

Is there any work-around for this? I can build fine UNLESS I use any custom API calls on GoogleVR such as _gvr_set_default_viewer_profile, etc.

HELP !

https://docs.unity3d.com/Manual/VRDevices-GoogleVR.html the last, Cardboard for iOS section describes the issues, probably cloud build cant be configured to use the “wrapper workspace” for building. But a confirmation from an official source would be helpful.

Hey guys, I was having the same problem. When you’re about to build in Unity, I found that by just going into the build settings and changing the XR Settings explicitly to Virtual Reality Supported and setting the Virtual Reality SDK to Cardboard the problem goes away in Xcode. Mind you, I’d recommend using .xcworkspace as well.