Skip to content
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

README: add section about using Firebase from a framework #5181

Merged
merged 7 commits into from
Mar 26, 2020

Conversation

maksymmalyhin
Copy link
Contributor

@maksymmalyhin maksymmalyhin commented Mar 24, 2020

A README section to address the confusing related to using Firebase from a framework/library. This should help developers with issues like firebase/quickstart-ios#936, #5152, #4315, etc.

#no-changelog

Copy link
Member

@paulb777 paulb777 left a comment

Choose a reason for hiding this comment

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

This is great! Thanks Maksym!

I think this is big enough for its own page with a link from the main README

Consider adding a section about the recommended way to modularize.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@ryanwilson
Copy link
Member

This is awesome Maksym, thank you!

@maksymmalyhin maksymmalyhin marked this pull request as ready for review March 25, 2020 15:01
Copy link
Member

@paulb777 paulb777 left a comment

Choose a reason for hiding this comment

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

I might not be fully understanding the pictures.

For me, it would be most illustrative to show before and after linking for both cases. In the static after case, everything is in the app box. In the dynamic case there is a copy of the static library both in the app and the dynamic library that will be loaded later at runtime.

use both the dynamic framework and one of its static dependencies directly in your app or another framework. In this case if you attempt to link
the same static framework/library to both the app and the dynamic framework you will end up with the static framework symbols added to both the app and the dynamic framework binaries. It means that when you app launches
it will have two copy of the static framework symbols. This leads to undefined behavior (especially when
different versions of the static framework are linking to the app and the dynamic framework). For example, a `dispatch_once` may or may not do the right initialization since there are now two entities to initialize. Here are couple more examples of issues related to this undefined behavior: #4315, #5152, etc.
Copy link
Member

Choose a reason for hiding this comment

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

Looks like GitHub links don't work from markdown. Please make into markdown links.

Also keep line lengths < 100 so the md file is readable in code editors

Copy link
Member

@paulb777 paulb777 left a comment

Choose a reason for hiding this comment

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

Thanks @maksymmalyhin !

@maksymmalyhin
Copy link
Contributor Author

I'm going to merge this PR as is, but feel free to provide feedback to be addressed in the followup PRs.

@maksymmalyhin maksymmalyhin merged commit 8491ead into master Mar 26, 2020
@maksymmalyhin maksymmalyhin deleted the mm/readme-libs branch March 26, 2020 15:07
pranavrajgopal pushed a commit that referenced this pull request Apr 8, 2020
* [WIP] README: add section about using Firebase from a framework.

* Typos, wording and examples

* Move to a separate file

* Add diagrams

* Errors and issues examples. Cleanup.

* Formatting

* Issue links
ryanwilson pushed a commit that referenced this pull request Apr 24, 2020
* [WIP] README: add section about using Firebase from a framework.

* Typos, wording and examples

* Move to a separate file

* Add diagrams

* Errors and issues examples. Cleanup.

* Formatting

* Issue links
@firebase firebase locked and limited conversation to collaborators Apr 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants