Set user agent with WebView with react-native

后端 未结 9 1554
闹比i
闹比i 2021-02-19 13:26

I want to modify the user agent string in a WebView so that on the server side I can detect that the request has come from my react-native app. I want to do this using the sourc

9条回答
  •  佛祖请我去吃肉
    2021-02-19 13:48

    For iOS, you can use WKWebView instead of WebView which support userAgent setting. https://github.com/react-native-community/react-native-webview/blob/master/docs/Reference.md#useragent

提交回复
热议问题