-
Notifications
You must be signed in to change notification settings - Fork 9
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
Implement BridgeDelegate and BridgeComponent Protocol #6
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* internal-message: Make `Message`'s json data non optional. Update `InternalMessage` and related tests. Ignore `*.xcuserstate`. Make replacing `Message`'s json data optional.
…ridgeComponent`. Update tests.
svara
commented
Aug 1, 2023
svara
commented
Aug 1, 2023
svara
commented
Aug 1, 2023
svara
changed the title
Add BridgeDelegate and BridgeComponent
Implement BridgeDelegate and BridgeComponent Protocol
Aug 1, 2023
jayohms
reviewed
Aug 2, 2023
* main: Fix broken Bridge test.
…en a web view is attached and detached.
jayohms
reviewed
Aug 3, 2023
jayohms
reviewed
Aug 3, 2023
* main: Update `xcodebuild` command. Update workflow file to use Xcode 14.2. Update test workflow to use Xcode 14.3..
… naming convention for delegate methods.
jayohms
reviewed
Aug 4, 2023
jayohms
reviewed
Aug 4, 2023
jayohms
approved these changes
Aug 4, 2023
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.
Love it, wonderful changes!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds
BridgeDelegate
and defines theBridgeComponent
protocol.BridgeDelegate
The
BridgeDelegate
acts as the proxy between the bridge and the app's components.It maintains a dictionary of initialized components and ensures that they are properly handled based on the received messages and lifecycle events.
It tracks the state of the destination's lifecycle and notifies the components about changes accordingly.
It provides methods to retrieve components by type and creates new components as needed.
BridgeComponent
The
BridgeComponent
protocol defines the base interface for components that can be registered with the bridge.It requires the implementation of methods for handling messages and lifecycle events specific to each component.
It provides a default implementation for sending messages through the bridge.