mobfishgmbh / Cardboard-VR-Unity-SDK

Apache License 2.0
56 stars 11 forks source link

"_gvr_set_default_viewer_profile" undefined symbols for architecture arm64 #75

Closed irgipaulius closed 4 years ago

irgipaulius commented 4 years ago

Hi. So as you may know, iOS 14 fucked all GVR apps. yay. I refuse using Cardboard XR because it does not provide all the functionality that my old GVR implementation had, so I found this repo and heard it supports Metal. I hope this will work on iOS 14 devices.

So I finished refactoring my app in a record-breaking 14 hours, and now when I archive xCode project, I'm faced with this:

Undefined symbols for architecture arm64:
  "_gvr_set_default_viewer_profile", referenced from:
      _GvrCardboardHelpers_SetViewerProfile_mA5AA4D3CE2B1069347C2A665EB51553D57E48F92 in Assembly-CSharp.o
      _GvrCardboardHelpers_gvr_set_default_viewer_profile_m0E3A23C0F7143C8574B26F27678AA4C024CF9C61 in Assembly-CSharp.o
     (maybe you meant: _GvrCardboardHelpers_gvr_set_default_viewer_profile_m0E3A23C0F7143C8574B26F27678AA4C024CF9C61)
  "_gvr_reset_tracking", referenced from:
      _GvrCardboardHelpers_Recenter_mFB068941B2B52795CAC3C30135BF80943DA8A0CF in Assembly-CSharp.o
      _GvrCardboardHelpers_gvr_reset_tracking_m820F2B0EE2207BCC19D8B649E17938EEC71FF099 in Assembly-CSharp.o
     (maybe you meant: _GvrCardboardHelpers_gvr_reset_tracking_m820F2B0EE2207BCC19D8B649E17938EEC71FF099)
  "_gvr_get_time_point_now", referenced from:
      _AndroidNativeKeyboardProvider_gvr_get_time_point_now_m375CFCE5625923A69155009C7A04BEBDE4B0D052 in Assembly-CSharp.o
      _AndroidNativeKeyboardProvider_UpdateData_mC14F1945CF74233DFEC04522D9FF0E9A949A36A1 in Assembly-CSharp.o
     (maybe you meant: _AndroidNativeKeyboardProvider_gvr_get_time_point_now_m375CFCE5625923A69155009C7A04BEBDE4B0D052)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I tried all solutions listed here and elsewhere, except for a few:

Any help or hint would be helpful and appreciated. Seriously, anything. Thanks

cdytoby commented 4 years ago

Hello, sorry for the late response, I don't have a device with iOS 14 installed so I cannot test on this system, however, I tested Unity 2020.1.7 with this project, exported to xcode project on MacOS Catalina, and open with newest xcode I can get, deployed to an iOS 12 device, and it works, with a change that I need to add to the documentation.

Now to the issue you mentioned:

irgipaulius commented 4 years ago

Thanks for the answer.

It's been some time since my post, and it became clear that there is no "quick fix" solution, sadly. I will have to refactor everything ground-up using a more modern XR system...

I think we can close this issue, since there isn't really a simple solution to my complicated problem.

Personal note: This is eye-watering. I really liked working on mobfish cardboard. And I do not want to spend so much time on my massive 3 year old app which I built with horrific programming practices. The app still generates nice income, so it's going to be worth it,. Damn Apple, Y U bother me

cdytoby commented 4 years ago

About the issue, as long as the legacy google cardboard package is included, this issue will happen, and I don't think they're related to this current cardboard package.

And I feel your pain, large refactor requirement also happens to many other people including me. But this is a really common among programming world. Google and Apple rapidly changing their programs and SDKs, even Unity changes its things from time to time. The problem is inevitable in my opinion. My solution currently is never interact with plugin directly, always build a "layer" between project and plugin, so that when plugin is changed, the project doesn't have to change too much, and the "layer" can be adjusted for a new or another plugin. But even so, some major refactor is still requried.

I hope you get this over with soon, and wish you a success on whatever you're building.

I updated the document, and I'll close this issue. If you need help with this SDK you can create a new issue.

hawkwood commented 4 years ago

I see this is closed, but I wanted to throw out an idea. If memory serves, the GvrCardboardReticle and GvrEventSystem are Unity scripts and independent from the native portions of the Cardboard SDK. With little script work, you should be able keep those and still remove the native portions.