iOS Build Environment Help Center

undefined symbol: OBJC_CLASS_$_FIRDatabase

append delete gonzalitosk8

Windows version: 10
Builder versión: 3.64
iOS version: 11.3.0

I have the following error:

undefined symbol: OBJC_CLASS_$_FIRDatabase

I tried with all versions, and with all the pods that are recommended within each firebase sdk.

I clarify that I have been using ios builder for 6 months and without any problem.

It all started when I migrated the IAP library to the recent version.

I don't know what changed, but since then I can't compile with ios builder.

I tried to return to the iap version prior to all this problem, but I had no luck.

From android it compiles without problems.
But when using ios builder, it gives me the errors that I provide below:

Images Console:
1 - https://postimg.cc/Mc8kjCrm
2 - https://postimg.cc/v17J70JF
3 - builder config: https://postimg.cc/JtzfJcKv
4 - (unity ios resolver settings) https://postimg.cc/VdS2ZfxF
5 - unity frameworks in plugins/ios: https://postimg.cc/XX1TgGzJ

I'm writing on this forum because it's the last resort I have left.

In all the photos, they point to updating pod from xcode (which I don't have)

What should I do?

Reply RSS

Replies

append delete #1. gonzalitosk8

I'm here to discuss the solution I found to this problem, for people who may be facing this type of errors with Firebase.

Always carefully review and read the errors that the build box throws up.

In my case, I read: "undefined symbol: OBJC_CLASS_$_FIRDatabase" but it also showed errors in classes like:
+ Storage
+ Messaging
+ Analysis
+ Auth
+ RemoteConfig

What I did (the documentation attached by the creator explains well) + Add the flag - ObjC (respect lowercase and uppercase if you are new to this)
+ Add each variable that I mention or that is missing, I show an example of how I did it: (Notepad image):
https://postimg.cc/zypVbrjk

"F:/Project/Iphone/" is the path where I have the project compiled from unity, inside the folder there is a folder called "Frameworks"

If you do not have that folder, be careful with the sdk you download:

Compatible sdk:

+ Sdk firebase (Unity): 12.2.0
+ Sdk firebase (iOS): 11.0.0

1 - Download the iOS version of Firebase
2 - Inside there are folders (these are framework containers)
3 - put these folders in your project: "Assets/Plugins/IOS/Firebase"

If you only use the iOS project, inside each folder you have to delete everything except:

info.plist

arm64

Img Before:
https://postimg.cc/JGVySK0j

Img After:
https://postimg.cc/8jRFGWf9

The rest is deleted (I attach a reference image of Database)
Path mentioned/FirebaseDatabase/FirebaseDatabase.xcframework/(Here leave only the files mentioned above, the rest are deleted so that the compiler does not conflict)

Do this with each .xcframework (one by one) of each reference.

In my case:
+ Database
+ Storage
+ Analytics, etc...

As an extra note, reinstall Xcode and download the iOS libraries again (normally it only downloads the Mac libraries)

touch iOS as well so it downloads the libraries.

Finally, when compiling, check the box "try to fix unsolved symbols" > this helped me to finally compile.

I attach an image of how I have configured iOS project builder (for reference):
https://postimg.cc/87T7z5h5

append delete #2. Pierre-Marie Baty

Hello

Glad to read you made it. And thank you for having taken the time to come back and post your solution for the others.

It hints me that (future) documentation should be somewhat even more explanative on this topic.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty