Closed NawarRajab closed 2 months ago
Hi @NawarRajab,
It would be helpful if you provide any additional information related to your issue such as build logs, a minimal, reproducible example of your implementation, as well as the steps you've taken to reproduce the issue. This way, we can identify what's causing this to happen.
Could you also elaborate the part where you mentioned the comparison between your Xcode project with and without Firebase? Are you facing a similar issue without any additional SDKs in your Unity project?
Hi, (obfuscated)Build Unity-iPhone_2024-02-22T11-16-11.txt
I've attached the build log. What I meant by the comparison is that I compared xcode project settings of:
I can't produce a sample project as the issue is specifically with how our project is configured and it's conflict with Firebase requirements. We have a bunch of ObjC libraries and they don't work well with the way Firebase configures its dependencies.
For example, we tried to build our project without Firebase integration but with use_frameworks! :linkage => :static
and it still produced build errors related to missing header files.
use_frameworks!
?For anyone facing the same issue, the solution is to bypass Firebase Unity SDK all together and use Firebase SwiftPM package. It's very simple process and is much cleaner solution:
PBXProject.AddRemotePackageReferenceAtVersionUpToNextMajor();
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
Firebase adds couple of pods to podfile. Here is our podfile:
Firebase recommends using static linking for pods by adding
use_frameworks! :linkage => :static
. When we do so, we get the following build (xcode) errors:Umbrella header 'FirebaseCoreInternal-umbrella.h' not found
and'google/protobuf/Any.pbobjc.h' file not found
Removing
use_frameworks! :linkage => :static
results in an error in pod install:a workaround would be to add pod
'GoogleUtilities', :modular_headers => true
. However, this results in the following build error:'FirebaseCoreInternal.modulemap' not found
I did a comparison between our xcode project with and without Firebase integration and nothing jumped out as different. I also did that with a fresh Unity project + Fire SDK.. same result. Firebase SDK for Unity has an iOSResolver component that does some operations on Unity post build. I replicated that for our build system. One thing that I don't know the purpose of is that Firebase adds a dummy swift file to UnityFramework target. I just replicated it.
Steps to reproduce:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? Yes What's the issue repro rate? (eg 100%, 1/5 etc) 100%
What happened? How can we make the problem occur? It's hard to reproduce. It's related to Firebase requirements and our project configuration. I can't give build logs at this point. I'll try to, if needed.
Relevant Code: