Questions tagged [react-native-webview]

406 questions
6
votes
5 answers

How can I send a message from the WebView to React Native?

I’ve successfully managed to send a message from React Native (RN) to a WebView. What I’m struggling with, is getting the message back from the WebView to RN. There’s no errors showing - it’s just that the message never gets through. Here is the…
MoO
  • 125
  • 1
  • 1
  • 9
5
votes
3 answers

Package react-native-webview has been ignored because it contains invalid configuration

here is the version Old Version => "react-native-webview": "^11.17.2", New Version => "react-native-webview": "^11.18.0" I am using webview to render html but it requires or depend on an other lib react-native-test-app here is the warning I…
Shafqat Bari
  • 382
  • 1
  • 3
  • 12
5
votes
1 answer

How change font-family (font-family.ttf from assets) of react-native webview

I am using react-native webview to display some web content in my react-native app. and my app font-family and webview font-family is different. I want to change webview font-family from app. Is there any method to change font-family of webview…
jamal
  • 1,007
  • 1
  • 11
  • 26
5
votes
3 answers

How to make WebView scrollable in react-native-webview?

I have that is embedded in a as I am using react-native-paper. I am trying to have WebView scrollable. The webview shows but not scrollable. Code I am using:
5
votes
1 answer

How can I get cookies from react native webView on iOS?

I have a Single-Sign-On site opened in a webView. After the user logs in I need to take a cookie to request a token from the API and use it in the application for all the other requests. This all works fine on the Android, but one the iOS there are…
5
votes
3 answers

How to inject React Component inside WebView (react-native-webview)?

Is there a way to pass in a web React component to WebView directly? Something like this- import ReactContainer from 'somewhere'; import { WebView } from "react-native-webview"; " }} >
Prakul Gupta
  • 51
  • 1
  • 2
5
votes
1 answer

Loading bundled static assets in React Native WebView

I have a React Native project where I'm trying to bundle some pre-generated HTML, JS, and CSS with the application, and have a WebView render the web assets using the react-native-community/react-native-webview library. I can load the index.html…
Payton Yao
  • 63
  • 1
  • 4
5
votes
2 answers

How to set custom fonts in WebView(react-native-webview) in iOS?

I want to set custom fonts in Webview. I have implemented the below code: @font-face { font-family: 'Poppins-Bold'; src:url('file:///android_asset/fonts/Poppins-Bold.ttf') format('truetype') } body{ font-family: Poppins-Bold margin:…
immodi
  • 607
  • 1
  • 6
  • 21
5
votes
2 answers

react-native : Get internal api call data from url of the WebView

I have a webview with a url (for example a payment processing page). When the url is loaded, certain api calls are done and i want to know how to get data from the internal api calls of that particular url. It is not something like communication…
FortuneCookie
  • 1,756
  • 3
  • 25
  • 41
5
votes
4 answers

React Native problem: WebView has been removed from React Native

I built new React Native project yesterday using react-native-cli. But when running the project with my android phone, I got this error in red screen. Invariant Violation: WebView has been removed from React Native. It can now be installed and…
5
votes
2 answers

Webview not appearing in Expo Web

Working fine in expo mobile app, but same code doesn't show anything when opening Expo App on Web browser by running command expo start --web Here is the sample code
haseem
  • 53
  • 1
  • 5
5
votes
0 answers

How can i prevent the default selection tooltip in react-native-webview

Basic description I'm rendering an epub file in the webview and i want to the user can't be able to copy a text but i want to let him select the text for some reasons (Highlight and some stuff) . default tooptip : I just wanted to disable this…
Mahdi
  • 1,355
  • 1
  • 12
  • 28
5
votes
2 answers

Want to clear cache from webView in React Native CookieManager.clearAll(); Not Working in iOS

Want to clear cache from Reaact-native-webView in React Native, {CookieManager.clearAll();}-Not Working in iOS
5
votes
1 answer

The method stopLoading of react-native-webview causes the website to freeze

I want to intercept clicks on a link in my webview in react-native and perform a custom action instead of navigating to the target of the link as described in the official guide. Here's what I do: import React from 'react'; import {View, Linking}…
Fencer
  • 1,026
  • 11
  • 27
5
votes
2 answers

React Native display PDF in Android web view

I have a React Native app in which at some page I've got a web view (react-native-webview) for displaying PDFs from our server. In iOS everything works fine, in Android, whenever I try to view the file I got: Cannot downoad files as permission was…
1
2
3
27 28