Project upgraded from Google Cardboard to GoogleVR runs in Unity but fails when building for iOS (XCode or Unity Cloud Build)

I started my project using Google Cardboard then I imported the new GoogleVR package to replace it. When I hit play in Unity my project works fine but when I try to build it for iOS I get errors on both the Xcode project and the Unity Cloud build project. I’m using Unity v5.5.0f3 on Mac

Undefined symbols for architecture armv7:
  "_endSettingsDialog", referenced from:
      -[DismissDialogViewController viewDidAppear:] in libvrunity.a(unity.o)
  "_isOpenGLAPI", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I’ve noticed that most of the answers to this kind of problem refer to SourceTree (This is what I’m using) ignoring .dll file when pushing the source code. At the moment I don’t have any .gitignore file in my working directory.

The only way I could get an iOS build was with Unity 5.6.0f2 and Google VR 1.30 by following these steps:

Enable VR Support for iOS in Unity and add Cardboard.
Search for UNITY_HAS_GOOGLEVR in the project scripts and modify the code to include IOS with Android as well.
Mostly this is putting || UNITY_IOS next to UNITY_ANDROID. A few places require some more detailed tweaks but you can figure it out reading the code.
You should do this for all Google VR SDK scripts except the ones related with Daydream Controller. What I did was to put it everywhere and clean them back following the console errors after you hit Build in Unity. Also I commented out a few of the lines with errors instead of rolling back UNITY_IOS as some part of the code was still needed in iOS.

  • Build in Unity.

  • In iOS Project Builder, add the path “-IPods\GVRSDK\Sources” for the missing file “GVROverlayView.h” as a compiler flag.

  • Remove the line containing:

    /* libPods-Unity-iPhone.a in Frameworks */,

from the project.pbxproj file in the Xcode project, because it was complaining “file not found”.

  • Compile using iOS Project Builder for Windows.

They only way to solve it was by:

  • Removing GoogleVR plugin (and all references to it) in my project
  • Replacing the GazeVR view tracking with a simple Raycasting in order to activate specific methods on the game object the user is looking to.
  • Activating virtual mode in the “Building Setting” when exporting to iOS
  • Removing libvrunity.a and libgvrunity.a libraries from the XCode project
  • Assuring the Bitcode support is set to NO
  • Importing GoogleVR as cocoapod.

Unfortunately this procedure prevents me from displaying the Stereo View in the Unity Editor.

@guneyzsan @alimoeeny Apparently we need to wait for an update. I have already opened an issue on GoogleVR GitHub repository.

How did they release 5.6 without fixing this?