-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[v11] Simplify Component System Usage #13047
Conversation
4f46050
to
6106f13
Compare
Going to merge here. I'll address any additional comments in a future PR |
|
||
/// A map of active instances, grouped by app. Keys are FirebaseApp names and values are arrays | ||
/// containing all instances of Storage associated with the given app. | ||
private static var instances: [String: Storage] = [:] |
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.
Found a small inconsistency between the comment and the code:
/// values are arrays containing all instances of Storage associated with the given app.
but
values are not arrays
private static var instances: [String: Storage] = [:]
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.
Fixed comment in #13055
/// Class to enable VertexAI to register via the Objective-C based Firebase component system. | ||
@objc(FIRVertexAIComponent) class FirebaseVertexAIComponent: NSObject {} | ||
|
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.
can this be removed?
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.
No, see updated comment in #13055
A Component class is not needed for products that don't need to do early initialization and if all of their dependencies are Eager components.
Only registerLibrary needs to run for userAgent configuration. This is done by checking for the existence of an
objc
class in FIRApp.m. If one doesn't exist at all a singleton empty@objc
class is added. See the example in VertexAI.swift.Fix a Storage unit test that was dependent on a race condition to pass. (URL overrides the bucket name when it pre-existed)
Fix #12957
TODO: Investigate deleting the
FIRDependency
class which seems to be ignored.#no-changelog