Can AppendUserAgent be set in code

I need to include the version number of the app in the UserAgent but manually setting it in the XML to be the same as the could introduce a human error if the AppendUserAgent gets out of date with the widget.

Can AppendUserAgent be set in code so that I can ensure it contains the correct version number?

Maybe you could use the app version plugin to get the correct version number?

Yep. Thing is, can I set the AppendUserAgent with the value returned?

Short Google search:


(iOS support seems limited to WKWebView though)

Which version number do you need in the UA? If it is the one from config.xml anyway, maybe there is a way to use it in there via a variable anyway?

Yep, unfortunately that plugin doesn’t support iOS 8 which I need to support. Probably a grunt task will be the best way to modify config.xml instead of code.

1 Like