Search Unity

Google VR builds fail on iOS -lGTMSessionFetcher

Discussion in 'AR/VR (XR) Discussion' started by juliang, May 3, 2017.

  1. juliang

    juliang

    Joined:
    Nov 25, 2008
    Posts:
    98
    Builds of GVR apps with the latest SDK now fail in Xcode with the error
    Library not found for -lGTMSessionFetcher

    Where did this come from? There's nothing on the Google developer website and I couldn't find anything relevant in StackOverflow.
     
  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    Google Ships the GVR NDK using the Cocoapads (http://cocoapods.org) library management system. The way Cocoapods works is that it takes your project and the dependencies outlined and generates a workspace that contains your project as well as the Cocoapods Pods project that contains the dependencies. When you make a iOS project for Cardboead, you need to open up this workspace and not the project. We do this for you automatically if you select Build & Run but if not then you need to open the workspace created in your project folder.

    The documentation did not outline this requirement and that should be fixed for 2017.1 and is in process for the current 5.6 documentation set.
     
    DBarlok likes this.
  3. juliang

    juliang

    Joined:
    Nov 25, 2008
    Posts:
    98
    That explains it, thanks. I can easily deal with Cocoapods, I use them in just about all my iOS apps.
    However, now I get a different error:
    Run custom shell script ‘[CP] Check Pods Manifest.lock’
    /Users/jeg/Library/Developer/Xcode/DerivedData/Unity-iPhone-dyyrriphkznckugpwrrtrynjldpv/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Script-35654F9BB99A1B25FF5284E2.sh: line 2: null: command not found
    Command /bin/sh failed with exit code 127
    I don't see that script in the package. Do I need a 'pod install' or something in the Xcode project?
     
  4. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    You shouldn't need to have done anything. No one else has reported this so I am wondering what your target is and how you are executing the build?
     
  5. juliang

    juliang

    Joined:
    Nov 25, 2008
    Posts:
    98
    The question about build target prompted me to go into the project directory and do a 'pod update'. It reported that it was updating GVRSDK from 1.20 to 1.40. After that the build worked and was installed on my iphone, so I'd say that updating took care of it.

    I was using a download from the Google Cardboard developer site which I got just on Monday, so that must need updating to the current version.

    Now to learn how to do Cocoapods in Unity, other than manually...
     
    DBarlok likes this.
  6. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    Thanks, I've reported that to Google.
     
    DBarlok likes this.
  7. ccklokwerks

    ccklokwerks

    Joined:
    Oct 21, 2014
    Posts:
    62
    Juliang, just want to say thank you for reporting how you were able to fix this through a pod update. Although I had some trepidation, I installed cocoapods and updating - from 1.60 to 1.80 -fixed my problem (which was the identical "command not found" issue you mention in post #3).

    (This was with Unity 5.6.3 and XCode 8.3.3. Hope I get the chance to update to 2017.1 or even 2017.2 soon.)
     
  8. pamelacook

    pamelacook

    Joined:
    Dec 13, 2017
    Posts:
    10
    I'm running Unity 2017.4.0f1. I got this error when I opened the project file by mistake. No error when I opened the workspace file.
     
  9. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958