Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Duplicate symbols for architecture arm64 in xCode for Google VR project created with Unity

Discussion in 'AR/VR (XR) Discussion' started by Santy, Oct 31, 2017.

  1. Santy

    Santy

    Joined:
    Apr 16, 2013
    Posts:
    26
    I'm getting this error when I try to build on xCode a project that uses Google VR SDK. The xCode project was built from Unity3D. I attach an image with the last lines of the error log from xCode.

    It seems the problem is xCode is finding duplicate code, as it finds the same in libGVRSDK.a and in libgvrunity.a.

    I tried this solution, based on using the following shell script:

    set -ex
    lipo libgvrunity.a -thin armv7 -output libgvrunity-armv7.a
    lipo libgvrunity.a -thin arm64 -output libgvrunity-arm64.a

    ar -t libgvrunity-armv7.a | grep 'GTMLogger\|GTMSession' | xargs ar -dv libgvrunity-armv7.a
    ar -t libgvrunity-arm64.a | grep 'GTMLogger\|GTMSession' | xargs ar -dv libgvrunity-arm64.a

    lipo libgvrunity.a -replace armv7 libgvrunity-armv7.a -replace arm64 libgvrunity-arm64.a -output libgvrunity-fat.a

    rm libgvrunity-armv7.a libgvrunity-arm64.a

    mkdir -p backup
    mv libgvrunity.a backup
    mv libgvrunity-fat.a libgvrunity.a


    After trying this solution, I get the same error (Duplicate symbols...). However the previous error was with another two libraries...

    I'm using Unity 2017.1.1 and I have tried with different versions of Google VR.

    I'm really stuck and I need to solve this problem...

    Thank you very much in advance.
     

    Attached Files:

  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    1) In your project folder, try deleting the libraries in the Plugins folder for iOS.
    2) If possible, completely delete your XCode project folder and recreate it from your Unity project.
     
  3. Santy

    Santy

    Joined:
    Apr 16, 2013
    Posts:
    26
    Thank you for your quick answer.

    There are not duplicated libraries in my Plugins/iOS folder. I attach an image of my folders.

    I'm also installing again Unity 5.6.0, as I successfully built a project with Google VR for iOS using this version. I don't understand what Pods is doing in xCode project generated with new Versions of Unity.

    Any other idea please?
     

    Attached Files:

  4. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    Remove Plugins/iOS/libgvrunity
     
  5. Santy

    Santy

    Joined:
    Apr 16, 2013
    Posts:
    26
    I installed last version of Unity and now I can build the project and it works, but only if you make the app to execute applicationWillResignActive() and applicationDidBecomeActive () after it.

    It's very weird. If I could force applicationDidBecomeActive() method to execute I think the App would work fine. Can i force it?
     
  6. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    It sounds like you need to manually update your GVR SDK. I would delete all the GVR SDK stuff (That include Plugins) from your Unity project and re-import the package.