-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Stop requiring pods to be static frameworks #6557
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, mostly LGTM except a couple questions.
NSBundle *containingBundle; | ||
NSURL *bundleURL; | ||
// The containing bundle is different whether FIAM is statically or dynamically linked. | ||
for (containingBundle in @[ [NSBundle mainBundle], [NSBundle bundleForClass:myClass] ]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional: wonder if we can reuse existing logic from Core?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem worth it. Only the one line internal relevantBundles
function would match as is.
@@ -1,76 +0,0 @@ | |||
# Using Firebase from a framework or a library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer adding a note explaining why it is not relevant for Firebase 7 instead of deleting. Also, it seems still to be a relevant concern for zip, Carthage and binary distributions where we keep using static binaries.
It's probably outside of the scope of this PR, but I think it may be useful to try to measure the difference of e.g. pre-main startup time between static and dynamic frameworks integration and add numbers to a README for developers to make more conscious decision on which to use in their project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored the docs with a Firebase 7 add. Thanks!
NSBundle *containingBundle; | ||
NSURL *bundleURL; | ||
// The containing bundle is different whether FIAM is statically or dynamically linked. | ||
for (containingBundle in @[ [NSBundle mainBundle], [NSBundle bundleForClass:myClass] ]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem worth it. Only the one line internal relevantBundles
function would match as is.
@maksymmalyhin @morganchen12 Good idea to do some measurements to help developers with the dynamic/static trade offs. Based on the measurements we did a few years ago, there are definite start up costs to using dynamic linking, and we should reevaluate and quantify. |
Fix #2022
Remove
static_framework
specifier from all podspecs. Use the Podfile optionuse_frameworks! :linkage => :static
to get 6.x Firebase linkage behavior.Additionally, this PR makes several changes to support the different bundle configuration of dynamic frameworks and associated tests:
I was also sad to delete the excellent doc's on static and dynamic frameworks from @maksymmalyhin, but I'm not sure they're still relevant.
I plan to do a follow-up PR to leverage CocoaPods 1.10 to add additional CI for
pod lib lint
testing with static frameworks.