semantic-release-bot da31ab56f0 chore(release): 10.0.0 [skip ci]
# [10.0.0](https://github.com/react-native-community/react-native-webview/compare/v9.4.0...v10.0.0) (2020-05-26)

### Bug Fixes

* **android:** add missing null check for fileTypes ([#1368](https://github.com/react-native-community/react-native-webview/issues/1368) by [@bengy](https://github.com/bengy)) ([4f0f0af](https://github.com/react-native-community/react-native-webview/commit/4f0f0afe70cf32739878932e236bfebbdee02a88))
* **gradle:** Load Android Gradle Plugin conditionally ([#1230](https://github.com/react-native-community/react-native-webview/issues/1230) by @SaeedZhiany) ([2639d52](https://github.com/react-native-community/react-native-webview/commit/2639d523e9336f5f640475bafd058f82f2bc0ab4))
* **iOS:** Trigger _onContentProcessDidTerminate when removing webview from superview ([#1378](https://github.com/react-native-community/react-native-webview/issues/1378) by [@pmusaraj](https://github.com/pmusaraj)) ([9240536](https://github.com/react-native-community/react-native-webview/commit/9240536afa4481fa2221cf857e3ced2a3611e902))
* **windows:** Fix windows local asset path ([#1335](https://github.com/react-native-community/react-native-webview/issues/1335) by [@kaiguo](https://github.com/kaiguo)) ([20a3f90](https://github.com/react-native-community/react-native-webview/commit/20a3f90c0f0b24c59ab6b31dc981e9e4f1c0473b))
* **windows:** Fixes ScriptNotify and InvokeScript ([#1354](https://github.com/react-native-community/react-native-webview/issues/1354) by [@benhamlin](https://github.com/benhamlin)) ([81e0360](https://github.com/react-native-community/react-native-webview/commit/81e0360edea465db9cba97240f37e8e29e0d6f1b))

### BREAKING CHANGES

* **gradle:** The Android Gradle plugin is only required when opening the project stand-alone, not when it is included as a dependency. By doing this, the project opens correctly in Android Studio, and it can also be consumed as a native module dependency from an application project without affecting the app project (avoiding unnecessary downloads/conflicts/etc).

Also moved getExtOrDefault to buildScript block to able to use everywhere in the file

This change shouldn't break any apps, but we are marking it as a breaking change in case there are some use cases we've missed.

[skip ci]
2020-05-26 22:02:28 +00:00
2018-09-10 18:46:07 -06:00
2018-09-10 18:46:07 -06:00
2018-09-08 10:42:02 -07:00
2020-05-26 22:02:28 +00:00

React Native WebView - a Modern, Cross-Platform WebView for React Native

star this repo PRs Welcome All Contributors Known Vulnerabilities NPM Version Lean Core Extracted

React Native WebView is a modern, well-supported, and cross-platform WebView for React Native. It is intended to be a replacement for the built-in WebView (which will be removed from core).

Core Maintainers - Sponsoring companies

This project is maintained for free by these people using both their free time and their company work time.

Platforms Supported

  • iOS
  • Android
  • macOS
  • Windows

Note: Expo support for React Native WebView started with Expo SDK v33.0.0.

Getting Started

Read our Getting Started Guide. If any step seems unclear, please create a detailed issue.

Versioning

This project follows semantic versioning. We do not hesitate to release breaking changes but they will be in a major version.

Breaking History:

Current Version: version

  • 8.0.0 - onNavigationStateChange now triggers with hash url changes

  • 7.0.1 - Removed UIWebView

  • 6.0.2 - Update to AndroidX. Make sure to enable it in your project's android/gradle.properties. See Getting Started Guide.

  • 5.0.1 - Refactored the old postMessage implementation for communication from webview to native.

  • 4.0.0 - Added cache (enabled by default).

  • 3.0.0 - WKWebview: Add shared process pool so cookies and localStorage are shared across webviews in iOS (enabled by default).

  • 2.0.0 - First release this is a replica of the core webview component

Upcoming:

  • this.webView.postMessage() removal (never documented and less flexible than injectJavascript) -> how to migrate
  • Kotlin rewrite
  • Maybe Swift rewrite

Usage

Import the WebView component from react-native-webview and use it like so:

import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { WebView } from 'react-native-webview';

// ...
class MyWebComponent extends Component {
  render() {
    return <WebView source={{ uri: 'https://reactnative.dev/' }} />;
  }
}

For more, read the API Reference and Guide. If you're interested in contributing, check out the Contributing Guide.

Common issues

  • If you're getting Invariant Violation: Native component for "RNCWebView does not exist" it likely means you forgot to run react-native link or there was some error with the linking process

Contributing

See Contributing.md

Contributors

Thanks goes to these wonderful people (emoji key):

Thibault Malbranche
Thibault Malbranche

💻 🤔 👀 📖 🚧 ⚠️ 🚇 💬
Jamon Holmgren
Jamon Holmgren

💻 🤔 👀 📖 🚧 ⚠️ 💡 💬
Andrei Pfeiffer
Andrei Pfeiffer

💻 👀 🤔
Michael Diarmid
Michael Diarmid

💻 👀 🤔 🔧
Scott Mathson
Scott Mathson

💻 📖
Margaret
Margaret

💻 📖
Jordan Sexton
Jordan Sexton

💻 📖
Malcolm Scruggs
Malcolm Scruggs

💻 🔧 ⚠️
Momazo7u7
Momazo7u7

📖
Marco
Marco

📖
Julien Eluard
Julien Eluard

📖
Jian Wei
Jian Wei

💻 📖
Sergei Butko
Sergei Butko

📖
TMomemt
TMomemt

💻
Eric Lewis
Eric Lewis

💻 📖
Daniel Vicory
Daniel Vicory

💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT

Traduções

This readme is available in:

Languages
TypeScript 27.4%
JavaScript 21.5%
Java 20.9%
Objective-C 20.3%
C++ 5.5%
Other 4.4%