2

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.

On Xcode:

ld: warning: arm64 function not 4-byte aligned: ltmp0 from /Users/gamedev/Desktop/VR1-iOS/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
 ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/gamedev/Desktop/VR1-iOS/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
 Undefined symbols for architecture arm64:
   "_endSettingsDialog", referenced from:
       -[DismissDialogViewController viewDidAppear:] in libvrunity.a(unity.o)
 ld: symbol(s) not found for architecture arm64
 clang: error: linker command failed with exit code 1 (use -v to see invocation)

on Unity cloud build:

[xcode] Undefined symbols for architecture armv7:
 9352:        [xcode]   "_endSettingsDialog", referenced from:
 9353:        [xcode]       -[DismissDialogViewController viewDidAppear:] in libvrunity.a(unity.o)
 9354:        [xcode]   "_isOpenGLAPI", referenced from:
 9355:        [xcode]       RegisterMonoModules() in RegisterMonoModules.o
 9356:        [xcode] ld: symbol(s) not found for architecture armv7
 9357:        [xcode] clang: error: linker command failed with exit code 1 (use -v to see invocation)
 9358:        [xcode] Showing first 200 warnings only
 9359:        [xcode] ** ARCHIVE FAILED **
 9360:        [xcode] The following build commands failed:
 9361:        [xcode]     Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-gccgnjkpqhormzcosgksevxlzeea/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/APPLICATION_PATH/vr1.app/vr1 normal armv7
 9362:        [xcode] (1 failure)

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.

UPDATE I have upgraded to Unity 5.6 and the errors changed a bit:

"_endSettingsDialog", referenced from:
-[DismissDialogViewController viewDidAppear:] in libvrunity.a(unity.o)

Undefined symbols for architecture arm64:
  "_isOpenGLAPI", referenced from:
      _iOSDevice_isOpenGLAPI_m3529398287 in Bulk_Assembly-CSharp_0.o
     (maybe you meant: _iOSDevice_isOpenGLAPI_m3529398287)
ld: symbol(s) not found for architecture arm64

when checking between the libraries linked (in Build Settings) I noticed I had both libvrunity.a and libgvrunity.a so I removed the first one and the error is disappeared, but I still have the second about OpenGL. The strange thing is that the project work flawlessly in unity.

Claus
  • 5,662
  • 10
  • 77
  • 118

2 Answers2

2

Apparently it is all about Google VR SDK. Current version 1.30 doesn't support native iOS in Unity 5.6.

They only way to solve it was:

  • 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 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.

We need to wait for the 1.40 update. I have already opened an issue on GoogleVR GitHub repository.

Claus
  • 5,662
  • 10
  • 77
  • 118
0

It seems you have missing files or some old one not removed: I'd suggest to remove all iOS plugins and re-import the correct ones once again.

  • I already removed all the previous Cardboard files and reimported the latest GoogleVR plugin. I can find references to the same error in multiple forums so it looks like it's quite common. – Claus Apr 02 '17 at 21:16
  • 1
    It's not necessarely carboard related. Forums are full of these odd errors that nobody can reproduce: it's always related to the user (you in this case) specidic code and configuration, like some pluging that is not playing well with the rest and the like. The only option left to you is to start a bounty or to just remove all plugins (really all), leaving only Unity code and your regular MonoBehaviour classes and take it from there. – Pino De Francesco Apr 03 '17 at 22:14