Search Unity

Unity + Firebase

Discussion in 'iOS and tvOS' started by AllanMSmith, Jan 23, 2018.

  1. AllanMSmith

    AllanMSmith

    Joined:
    Oct 2, 2012
    Posts:
    180
    Hi,

    Our team is developing a pretty large project in Unity and we are currently trying to implement Firebase Analytics for Unity. We figured it would be pretty straight forward following their documentation but apparently we were wrong. We got a lot of other SDKs in our project (ad networks, facebook, other analytics solutions...) and we are having trouble getting Firebase to work for iOS for some reason.

    In fact, we cannot even build the project now. We can build the XCode project, but when we try to install it on the device, we get the following error:

    ld: warning: directory not found for option '-L/Users/firehorse/Library/Developer/Xcode/DerivedData/Unity-iPhone-bttrsnflgxtdzedzjhvohshtucpx/Build/Products/ReleaseForRunning-iphoneos/GoogleToolboxForMac'
    ld: warning: directory not found for option '-L/Users/firehorse/Library/Developer/Xcode/DerivedData/Unity-iPhone-bttrsnflgxtdzedzjhvohshtucpx/Build/Products/ReleaseForRunning-iphoneos/nanopb'
    ld: library not found for -lGoogleToolboxForMac

    I thought that maybe my mac didnt have google toolbox for mac or something like that, so I went looking for Cocoapods stuff (Im really not familiar with it), so I checked the podfile, checked the cocoapods version, added the line to install GoogleToolboxForMac (pod 'GoogleToolboxForMac', '~> 2.1'), ran pod install on my own... and apparently everything is correct and working, GoogleToolboxForMac is installed in the end.

    I also tried the approach without cocoapods, adding the frameworks by hand, adding -ObjC, doing everything that is on their documentation page and still I cannot get this build to work for some reason.

    Anyone ever had this problem? Any hints of what I might be missing?

    PS: I tried this
    https://stackoverflow.com/questions...or-using-firebase-unity-sdk/43260825#43260825

    and everything here as well (not that there is too much to try here)
    https://firebase.google.com/docs/unity/setup

    Thanks for your time,
    Best,
    Allan
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  3. AllanMSmith

    AllanMSmith

    Joined:
    Oct 2, 2012
    Posts:
    180
    hey Jeff, yes, I actually am using Unity Analytics as well, but Firebase would assist us in some ways like knowing the source of players and linking those metrics directly to Adword campaigns and so on... that is why we are trying to get it to work.

    As an added note, I tried creating a new unity project, building it with the firebase unitypackage and it still doesn't work, with the exact same error =/

    Best,
    Allan
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446