https://github.com/mehcode/rn-ios-user-agent
Set (and unset) a UserAgent to be used in WebView.
https://github.com/mehcode/rn-ios-user-agent
Last synced: 11 months ago
JSON representation
Set (and unset) a UserAgent to be used in WebView.
- Host: GitHub
- URL: https://github.com/mehcode/rn-ios-user-agent
- Owner: mehcode
- License: mit
- Created: 2016-08-11T06:18:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-11-26T13:54:25.000Z (over 6 years ago)
- Last Synced: 2025-03-01T11:34:53.470Z (12 months ago)
- Language: Objective-C
- Homepage:
- Size: 12.7 KB
- Stars: 26
- Watchers: 3
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Native iOS UserAgent
> Set (and unset) a UserAgent to be used in WebView.
## Install
1. `npm install --save rn-ios-user-agent`
2. `react-native link rn-ios-user-agent`
## Usage
```js
import UserAgentIOS from "rn-ios-user-agent";
// Change user agent for all future web views
UserAgentIOS.set("new user agent");
// Go back to system default user agent
UserAgentIOS.unset();
```