Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building the database sample project for iOS on Xcode #77

Closed
tjjos opened this issue Apr 20, 2017 · 3 comments
Closed

Error when building the database sample project for iOS on Xcode #77

tjjos opened this issue Apr 20, 2017 · 3 comments

Comments

@tjjos
Copy link

tjjos commented Apr 20, 2017

I'm following the instructions found on the Firebase Database Quickstart page, and correctly generating the Xcode project from Unity. I can see that the podfile is correctly generated as well as the podfile.lock and Pods folder. But when I try to build it from Xcode, I get multiple errors on on GTMLogger.m:

  • .../Pods/GoogleToolboxForMac/Foundation/GTMLogger.m:48:46: 'retain' is unavailable: not available in automatic reference counting mode
  • .../Pods/GoogleToolboxForMac/Foundation/GTMLogger.m:48:46: ARC forbids explicit message send of 'retain'

I searched for this type of ARC errors but found nothing relating to firebase. I also tried installing the pods directly (with pod install), and modifying the podfile to generate the xcworkspace file, and opening this file on Xcode instead of the project file, but this gave different errors, like:

  • diff: /../Podfile.lock: No such file or directory
  • diff: /Manifest.lock: No such file or directory
  • error: The sandbox is not in sync with the Podfile.lock.

Which I also did a lot of research on but none of the solutions provided worked (cleaning the project, pod install, pod update, pod deintegrate, etc.)

Finally, based on this thread, it was suggested that the xcworkspace is not really needed because the unity compilation injects all of the necessary dependencies directly in the generated xcodeproject.

So I'm back to the original setup, only using the xcode project generated as is by unity, unable to build because of the ARC errors listed above.

My current setup is:

  • Unity 5.5.2f1 (tried also with Unity 5.5.3f1)
  • XCode 8.3.2
  • Firebase 3.0.1 (only using the Database sdk)
  • Pod 1.2.1 (tried also with Pod 1.2.0)

Any ideas on how to proceed?

@agentargyle
Copy link

Hi Tjjos.

Are you at least able to playtest in the Unity editor? I can't get the database testapp to work at all in 5.6.0f3. I get runtime errors when I try to playtest in the unity editor and linking errors when running the build from Xcode on an iPhone target.

By the way. is it necessary to install the individual coco pods when building in Unity? Because the documentation on the firebase site mentions that only for direct iOS development.

If any Firebase devs are reading this, it would be great if you could build the demos and the sdk into an asset and put it up on the Unity asset store and make sure that it just works out of the box with as little fiddling as possible. Thanks!

@stewartmiles
Copy link
Contributor

The GTM logger compile error you ran into suggests that the Firebase plugin didn't get to set the appropriate compile flags for the module. Do you have the editor log from your build that you can share? If you turn on verbose logging in "Assets > Play Services Resolver > IOS Resolver > Settings" we'll be able to start to figure out what's going on.

Also, you're correct in Unity 5.5 we integrate directly into the project without a workspace so that "Build & Run" works as expected. Since Unity 5.6 there is support for Unity to open up Xcode workspaces in which case we have an option to use Cocoapods "correctly" generating the workspace that Unity opens.

FYI: We just released v4.0.0 with some bug fixes and features you may want to check out
https://firebase.google.com/support/release-notes/unity#4.0.0

Cheers,
Stewart

@agentargyle
Copy link

agentargyle commented Jun 9, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants