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

Add a way for apps to obtain a user-agent substring for registered components in the app #18

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

jayohms
Copy link
Collaborator

@jayohms jayohms commented Aug 2, 2023

This adds a built-in way for the library to produce a user-agent substring that apps can include in their WebView user-agent and API requests.

Apps can obtain the user-agent string by calling:

Bridge.userAgentSubstring(componentFactories)

It will produce a string that looks like:

"bridge-components: [one two three four]"

Apps can then include this substring in the user-agent for their WebView instances and API requests

…that apps can include in their WebView user-agent and API requests
@jayohms jayohms requested a review from svara August 2, 2023 15:50
Copy link

@svara svara left a comment

Choose a reason for hiding this comment

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

@jayohms Looks good 👍🏻

@jayohms jayohms merged commit d8bfe23 into main Aug 3, 2023
1 check passed
@jayohms jayohms deleted the user-agent-substring branch August 3, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants