Compilation warnings and runtime issues integrating Google and Firebase dependencies

The integration of Firebase and Google Swift Packages, which Swift turns into Xcode targets, causes compilation warnings and runtime issues like the one described below. I’m creating this discussion to better understand:

  • Why those issues happen.
  • What can users do about them?
  • What Tuist could do to smooth the integration.

I’m looping @marekfort into the conversations since he’s been working a lot with those dependencies lately.

I resolved the issue by changing my custom Authentication framework from dynamic to static, which allowed me to correctly link Firebase dependencies with it. I also ensured that both FirebaseCore and FirebaseCoreInternal remain static when configured in the Package.swift file. This is important because if we configure these dependencies as a dynamic framework, issues arise with Firebase’s internal dependencies.

We can see it as follows:

FirebaseAuthentication -> Custom Static framework -> App

In addition, we can use some dynamic framework in the static frameworks if needed.

[FirebaseAuthentication, Custom dynamic framework] -> Custom Static framework -> App

I think it would be a good idea to analyze Firebase dependencies more thoroughly since, due to the large amount of Objective-C code, we could try to create a more viable path for implementing it with Tuist or at least streamline it.