Firebase for Unity with Unity Cloud Build

1,637 views
Skip to first unread message

Brent Vincent

unread,
Sep 6, 2017, 11:05:50 AM9/6/17
to Firebase Google Group
We've added Firebase Auth and Firebase Analytics to our Unity project, and have followed the steps outlined here to get the project working with Unity Cloud Build. After quite a bit of debugging we've tried compiling locally to get more information and we're seeing this linker error: 

ld: library not found for -lPods-Unity-iPhone


When we manually remove the reference to libPods-Unity-iPhone.a from the xcode project we're able to build the project, but we've had trouble getting the removal to work with the Unity Xcode API (even to test the libPods-Unity-iPhone.a removal on Unity Cloud Build). The library name suggests that it's related to Cocoapods, but we've theoretically removed the dependency on Cocoapods by following the steps mentioned in the original StackOverflow answer.


I've attached the local build log including the linker failure. Any suggestions on anything we might have missed, the nature of the issue and/or how we might solve this? 


Thank you very much for your help!

Brent Vincent



Build target Unity-iPhone_2017-09-05T20-06-38.rtf

Stewart Miles

unread,
Sep 6, 2017, 8:06:16 PM9/6/17
to Firebase Google Group
Hi Brent,

We actually support building with Unity Cloud Build in Firebase Unity SDK 4.1.0 but it's *slow* as we need to bootstrap Cocoapods tools and download the pod specs on each build.  All of the code that does this work is in the IOSResolver component of https://github.com/googlesamples/unity-jar-resolver if you're interested.

In terms of the link error you're running into.  It looks like "-lPods-Unity-iPhone" is coming from modifying Unity's generated Xcode project that has then had Cocoapods installed.  Pods-Unity-iPhone is the build target that is generated when running "pod install" on the Xcode project generated by Unity.

Firstly, if you're using Firebase Unity SDK < 4.1.0 I highly recommend you upgrade.

Then if you want to manually integrate Xcode frameworks into your project as very roughly described in the stack overflow post you cited:
Cheers,
Stewart


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/fa5873ce-e223-4682-9272-44b66fd8d383%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brent Vincent

unread,
Sep 7, 2017, 9:56:14 PM9/7/17
to fireba...@googlegroups.com
Stewart,

Thank you so much! We used your instructions and our Unity Cloud Build project is now working correctly.

Best regards,
Brent




For more options, visit https://groups.google.com/d/optout.



--
Brent Vincent

Otto Lopes

unread,
Sep 11, 2017, 2:41:51 PM9/11/17
to Firebase Google Group
Hi Stewart,
I didn't got this part: 
you'll need to add this to your build script running on UCB.
Do you have an example for this one?

Thanks
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

Stewart Miles

unread,
Sep 11, 2017, 3:25:02 PM9/11/17
to Firebase Google Group
You need to add an editor script to your project that executes "Google.IOSResolver.CocoapodsIntegrationEnabled = false" before the project is built.

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Otto Lopes

unread,
Sep 12, 2017, 10:13:36 AM9/12/17
to Firebase Google Group
Ok, I managed to make work by editing IOSResolver.cs and building ios-resolver. Then I replaced the generated package with this custom code. Is there an easier way to do that?

Thanks

Scott Mather

unread,
Sep 16, 2017, 1:34:25 PM9/16/17
to Firebase Google Group
Hi,

I was able to disable the integration without editing IOSResolver.cs.  I used the following code inside a Pre-Export Method:

Google.IOSResolver.CocoapodsIntegrationMethodPref = Google.IOSResolver.CocoapodsIntegrationMethod.None;
Google.IOSResolver.PodfileGenerationEnabled = false;


Hope this is helpful!
Reply all
Reply to author
Forward
0 new messages