-
Notifications
You must be signed in to change notification settings - Fork 13
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
Breaking API change: applications can set a User-Agent prefix #56
Conversation
@@ -1,15 +1,29 @@ | |||
import Foundation | |||
import HotwireNative | |||
@testable import HotwireNative |
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.
@testable
is needed to access the (now) internal UserAgent
function.
Demo/SceneController.swift
Outdated
// TODO: Move to AppDelegate when PR #55 is merged. | ||
// https://github.com/hotwired/hotwire-native-ios/pull/55/files | ||
Hotwire.config.applicationUserAgentPrefix = "Hotwire Demo;" |
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.
Commenting so we don't forget about this to-do.
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 took care of this here.
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.
Thanks!
* main: Set session's path config from the global path config. Consolidate all global config by moving it in app delegate. Add utility func to load path config to the Hotwire enum. Move `matchQueryStrings` to `PathConfiguration`. Move `registerBridgeComponents` to `AppDelegate`.
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.
Nicely done @joemasilotti 👏🏻
Brings Android PR #77 to iOS, allowing developers to set a custom user agent prefix without breaking bridge components or removing "Hotwire Native".
Developers can set a custom
applicationUserAgentPrefix
for their application via:Whenever a
WKWebView
instance is created, the library will now automatically include:applicationUserAgentPrefix
WKWebView
's default user agent will also be added to the beginning of the user agent.