SafariServices API to set user agent

As far as I am aware it is not possible to change the user agent via javascript in Safari 13, and I was not able to find anything in the SafariServices documentation. Is this possible?

Replies

Nevermind, an API method does exist:


SFSafariExtensionHandling.additionalRequestHeader(for:completionHandler:)

That wouldn't let you change the user agent. Please file a radar about this, including why you would want this for your extension?

Thanks for the reply. I have filed FB7560553.

Received! Thanks for filing it.