react-native-static-server | HTTP static file server for React Native | Frontend Framework library
kandi X-RAY | react-native-static-server Summary
kandi X-RAY | react-native-static-server Summary
HTTP static file server for React Native
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Start the server
- Find a random port
- Check if the input string is an IPv4 address
- Get local IP address
- Initializes this component
- Loads the Flipper
- Get native ReactNativeHost
- Determines if the given string is an IPv6 address
- Checks if the input string is an IPv6 address
- Return true if the given string is an IPv6 address
- Stop the host destroy
- Stops the server
- Create view managers
- Check if the server is running
- Create a native server module
- Resolves a promise
- Initialize Flinpper plugin
- Override this method if the response is not modified
react-native-static-server Key Features
react-native-static-server Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-static-server
QUESTION
I am building a React Native app and having an issue with a webview. This webview has the HTML hardcoded into it, but fetches additional files from a static server running in the app.
This works fine on iOS and it works on Android in development, but when I build an APK the files fail to be loaded into the webview.
I've made a repo where the bug is reproduced. Running this app with npm run android
works as intended, and the HTML loads the image from the static server:
But when an APK is build (npm run build
) and installed on the device, the image fails to load:
Why is the image not loading in the release build? I know that the static server is working because I can access it from the web browser while the app is running. I've read through the react-native-webview docs and haven't found anything that explains this
...ANSWER
Answered 2021-Aug-23 at 13:18I found it! The problem is that the static server is not using HTTPS, so I needed to add
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-static-server
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page