Skip to content

Conversation

ncooke3
Copy link
Member

@ncooke3 ncooke3 commented Sep 13, 2024

This PR adds support for SDKs outside of the firebase-ios-sdk repo to register with core. Like how the Swift SDKs inside of the firebase-ios-sdk repo are registered, it relies on hardcoding information about the SDK in core.

To support SDKs that may have a version different from core, they have the option of implementing the func sdkVersion() -> String method.

For example, the below code belongs to the Foo package that lives outside of the firebease-ios-sdk repo. If the below code is included in the Foo SDK, and the client depends on both Foo and the firebase-ios-sdk packages, Foo will register itself with core.

// Foo.swift
// Inside of the `Foo` package

@objc(FIRFooComponent) class FirebaseFooComponent: NSObject {
  @objc static func sdkVersion() -> String {
    return "12.0.0" 
  }
}

@google-oss-bot
Copy link

1 Warning
⚠️ Did you forget to add a changelog entry? (Add #no-changelog to the PR description to silence this warning.)

Generated by 🚫 Danger

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.

Should be good to merge after functionality confirmed and tested in firebase/data-connect-ios-sdk#8

@ncooke3 ncooke3 marked this pull request as ready for review September 19, 2024 17:11
@ncooke3 ncooke3 merged commit 9f27468 into main Sep 19, 2024
44 checks passed
@ncooke3 ncooke3 deleted the nc/demo-reg branch September 19, 2024 17:13
@firebase firebase locked and limited conversation to collaborators Oct 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants