firebase/quickstart-cpp

iOS: Linker Error after update to Cpp version 4.4.2

ForestRingGames opened this issue · 3 comments

We recently reported this issue (#21 (comment)) and now tried to update to the latest version on iOS:

We downloaded iOS SDK version 4.9.0 and CPP SDK version 4.4.2 and added these frameworks (manually, no CocoaPods) to Xcode:

image

Unfortunately, we're getting this linker error:

Undefined symbols for architecture arm64:
  "flatbuffers::Parser::ParseFlexBuffer(char const*, char const*, flexbuffers::Builder*)", referenced from:
      firebase::util::JsonToVariant(char const*) in firebase(variant_util_be3a3a6b14e247f3427cf0fbbde761a7.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

We already tried to add all of the CPP framework files to the project, hoping that the missing parts would be in one of the other frameworks - but this didn't help. It seems like none of the frameworks contain the missing piece.

What can we do to get it running again?

Hi, I'm a developer on the Firebase C++ libraries, sorry for the delay in getting back to you. This is indeed a missing dependency on our end, and we'll try to get a official fix out ASAP.

As for potential fixes to get you running again before that is out, there are two options:

  1. The symbols that are missing are not actually being used, so I'm wondering if you are using a linker flag that forces symbols to be resolved, like "-Wl,-force_load"? If so, dropping that might resolve your problem.

  2. I've attached a new firebase.framework that have those symbols removed, which should be another way to resolve your linker errors, if you want to try that out.

Thanks for pointing out this issue to us.
FirebaseFramework.zip

Thank you, with your attached file it does work.

The only linker flag we use is "-ObjC", so that's most likely not the issue?

We're going to try to update Android as well tomorrow, we'll report back if we have any more issues (but hopefully not ;) )

Great, glad that fixed it. We've released the fix officially with Firebase C++ 4.4.3:
https://firebase.google.com/support/release-notes/cpp-relnotes#4.4.3