Skip to content

iOS: remove desktop sources that were mistakenly merged into app/CMakeLists.txt #868

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

Merged
merged 1 commit into from
Mar 20, 2022

Conversation

arizigler
Copy link
Contributor

@arizigler arizigler commented Mar 16, 2022

Description

Since latest Xcode (13.3) and clang++ (apple 13.1.6) iOS apps can no longer compile as the linker complains about undefined symbols:

Undefined symbols for architecture arm64:
  "firebase::AppDataDir(char const*, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)", referenced from:
      firebase::(anonymous namespace)::GetFilename(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in firebase(heartbeat_date_storage_desktop.cc.o)

Taking a deeper look it seems like there is indeed an undefined symbol in firebase.xcframework:

         U __ZN8firebase10AppDataDirEPKcbPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE

While searching for this symbol in the repo it seems to be defined in a file called app/src/filesystem_apple.mm and indeed it's not part of iOS source files in app/CMakeLists.txt.

It's not clear what has changed in Apple clang++ 13.1.6 compared to Apple clang++ 13.0.0 but somehow the former throws the aforementioned undefined symbol error.

There are 2 possible fixes, AFAIK:

  1. add filesystem_apple.mm to iOS sources in the CMakeLists.txt file.
  2. remove heartbeat_date_storage_desktop.cc and heartbeat_info_desktop.cc as they're not needed by iOS build.

I took the second approach as it seems to me this has been a mistake slipped in through the merge (which can as well be wrong).


Testing

Built my app with the patched version on Xcode 13.3 and it managed to compile and work as expected.


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Notes

  • Bug fixes and feature changes require an update to the Release Notes section of release_build_files/readme.md.
  • Read the contribution guidelines CONTRIBUTING.md.
  • Changes to the public API require an internal API review. If you'd like to help us make Firebase APIs better, please propose your change in a feature request so that we can discuss it together.

@google-cla
Copy link

google-cla bot commented Mar 16, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

@jonsimantov
Copy link
Contributor

Hi @arizigler,

Thanks for the fix, nice catch!

Could you please follow the instructions in this comment from google-cla to allow us to include your PR?

Thanks again!

Jon

@arizigler
Copy link
Contributor Author

Hi @jonsimantov,
Glad I could share my little contribution to your awesome project. Keep up the great work you're doing!
I believe I followed the cla guidelines and passed the cla automatic check. Can you please verify?
It says now it is only blocked because it needs a reviewer.

@jonsimantov jonsimantov self-requested a review March 20, 2022 01:47
@github-actions github-actions bot added the tests: in-progress This PR's integration tests are in progress. label Mar 20, 2022
@github-actions
Copy link

github-actions bot commented Mar 20, 2022

✅  Integration test succeeded!

Requested by @jonsimantov on commit refs/pull/868/merge
Last updated: Sat Mar 19 20:53 PDT 2022
View integration test log & download artifacts

Copy link
Contributor

@jonsimantov jonsimantov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved assuming integration tests succeed.

@github-actions github-actions bot added the tests: succeeded This PR's integration tests succeeded. label Mar 20, 2022
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Mar 20, 2022
@jonsimantov jonsimantov merged commit 90f9486 into firebase:main Mar 20, 2022
@firebase firebase locked and limited conversation to collaborators Apr 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tests: succeeded This PR's integration tests succeeded. type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants