This is the basic code for creating a react native WebView wrapper for your service. Just the basic code with the necessary handlers.
Firstly, create a new React Native project, bootstrapped using @react-native-community/cli
.
And install dependencies:
npm install react-native-webview react-native-gesture-handler @react-native-cookies/cookies base64-js react-native-mime-types rn-fetch-blob
# OR using Yarn
Copy the code from the repository and configure the constants.js
for your service. Minimally you need to set the URL of your service:
export const URL = 'https://...'
Try to run:
npm run android
npm run ios
# OR using Yarn
yarn android
yarn ios
WebView allows you to add custom styles for display, but it doesn't always help. You can improve the display of your site by injecting scripts into the page. I place such scripts in pageEnhancement.js