Skip to content

Commit

Permalink
chore: Merge pull request #15 from legobeat/metamask-namespace
Browse files Browse the repository at this point in the history
rename package to @metamask/react-native-webview
  • Loading branch information
sethkfman authored May 16, 2024
2 parents a1144d9 + 4ef3ddb commit 6a621e1
Show file tree
Hide file tree
Showing 19 changed files with 39 additions and 39 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# React Native WebView

![star this repo](https://img.shields.io/github/stars/react-native-webview/react-native-webview?style=flat-square)
![star this repo](https://img.shields.io/github/stars/MetaMask/react-native-webview-mm?style=flat-square)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![NPM Version](https://img.shields.io/npm/v/react-native-webview.svg?style=flat-square)](https://www.npmjs.com/package/react-native-webview)
![Npm Downloads](https://img.shields.io/npm/dm/react-native-webview.svg)
[![NPM Version](https://img.shields.io/npm/v/@metamask/react-native-webview.svg?style=flat-square)](https://www.npmjs.com/package/@metamask/react-native-webview)
![Npm Downloads](https://img.shields.io/npm/dm/@metamask/react-native-webview.svg)

**React Native WebView** is a community maintained WebView component for React Native. It is intended to be a replacement for the built-in WebView (which was [removed from core](https://github.com/react-native-community/discussions-and-proposals/pull/3)).

### Maintainers

**Many thanks to these companies** for providing us with time to work on open source.
**Many thanks to these companies** for providing us with time to work on open source.
Please note that maintainers spend a lot of free time working on this too so feel free to sponsor them, **it really makes a difference.**

- [Thibault Malbranche](https://github.com/Titozzz) ([Twitter @titozzz](https://twitter.com/titozzz)) from [Brigad](https://www.brigad.co/en-gb/about-us)
- [Thibault Malbranche](https://github.com/Titozzz) ([Twitter @titozzz](https://twitter.com/titozzz)) from [Brigad](https://www.brigad.co/en-gb/about-us)
[*Sponsor me* ❤️ !](https://github.com/sponsors/Titozzz)


Expand All @@ -26,13 +26,13 @@ Shout-out to [Jamon Holmgren](https://github.com/jamonholmgren) from [Infinite R

Maintaining WebView is very complex, because it is often used for many different usecases (rendering svgs, pdfs, login flows, and much more). We also support many platforms and both architecture of react-native.

Since WebView was extracted from React Native core, nearly 500 pull requests have been merged.
Considering that we have limited time, issues will mostly serve as a discussion place for the community, while **we will prioritize reviewing and merging pull requests.**
Since WebView was extracted from React Native core, nearly 500 pull requests have been merged.
Considering that we have limited time, issues will mostly serve as a discussion place for the community, while **we will prioritize reviewing and merging pull requests.**

### Platform compatibility

This project is compatible with **iOS**, **Android**, **Windows** and **macOS**.
This project support both **the old** (paper) **and the new architecture** (fabric).
This project is compatible with **iOS**, **Android**, **Windows** and **macOS**.
This project support both **the old** (paper) **and the new architecture** (fabric).
This project is compatible with [expo](https://docs.expo.dev/versions/latest/sdk/webview/).

### Getting Started
Expand All @@ -50,7 +50,7 @@ Import the `WebView` component from `react-native-webview` and use it like so:
```tsx
import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { WebView } from 'react-native-webview';
import { WebView } from '@metamask/react-native-webview';

// ...
const MyWebComponent = () => {
Expand All @@ -63,11 +63,11 @@ For more, read the [API Reference](./docs/Reference.md) and [Guide](./docs/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
- If you encounter a build error during the task `:app:mergeDexRelease`, you need to enable multidex support in `android/app/build.gradle` as discussed in [this issue](https://github.com/react-native-webview/react-native-webview/issues/1344#issuecomment-650544648)
- If you encounter a build error during the task `:app:mergeDexRelease`, you need to enable multidex support in `android/app/build.gradle` as discussed in [this issue](https://github.com/MetaMask/react-native-webview-mm/issues/1344#issuecomment-650544648)

#### Contributing

Contributions are welcome, see [Contributing.md](https://github.com/react-native-webview/react-native-webview/blob/master/docs/Contributing.md)
Contributions are welcome, see [Contributing.md](https://github.com/MetaMask/react-native-webview-mm/blob/master/docs/Contributing.md)

### License

Expand Down
2 changes: 1 addition & 1 deletion example/examples/Alerts.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {Text, View} from 'react-native';

import WebView from 'react-native-webview';
import WebView from '@metamask/react-native-webview';

const HTML = `
<!DOCTYPE html>\n
Expand Down
2 changes: 1 addition & 1 deletion example/examples/ApplePay.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {View} from 'react-native';

import WebView from 'react-native-webview';
import WebView from '@metamask/react-native-webview';

type Props = {};
type State = {};
Expand Down
2 changes: 1 addition & 1 deletion example/examples/Background.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {Text, View} from 'react-native';

import WebView from 'react-native-webview';
import WebView from '@metamask/react-native-webview';

const HTML = `
<!DOCTYPE html>\n
Expand Down
2 changes: 1 addition & 1 deletion example/examples/ClearData.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { View, Button } from 'react-native';

import WebView from 'react-native-webview';
import WebView from '@metamask/react-native-webview';

type Props = {};
type State = {};
Expand Down
2 changes: 1 addition & 1 deletion example/examples/CustomMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {Button, Linking, Text, View} from 'react-native';

import WebView from 'react-native-webview';
import WebView from '@metamask/react-native-webview';

const HTML = `
<!DOCTYPE html>\n
Expand Down
2 changes: 1 addition & 1 deletion example/examples/Downloads.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {Alert, Platform, View} from 'react-native';

import WebView, {FileDownload} from 'react-native-webview';
import WebView, {FileDownload} from '@metamask/react-native-webview';

const HTML = `
<!DOCTYPE html>\n
Expand Down
2 changes: 1 addition & 1 deletion example/examples/Injection.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {Text, View, ScrollView} from 'react-native';

import WebView from 'react-native-webview';
import WebView from '@metamask/react-native-webview';

const HTML = `
<!DOCTYPE html>
Expand Down
2 changes: 1 addition & 1 deletion example/examples/LocalPageLoad.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {Component} from 'react';
import {View, Text, Alert, TextInput, Button} from 'react-native';
import WebView from 'react-native-webview';
import WebView from '@metamask/react-native-webview';
const localHtmlFile = require('../assets/test.html');

export default class LocalPageLoad extends Component<Props, State> {
Expand Down
2 changes: 1 addition & 1 deletion example/examples/Messaging.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {View, Alert, TextInput} from 'react-native';

import WebView from 'react-native-webview';
import WebView from '@metamask/react-native-webview';

const HTML = `<!DOCTYPE html>\n
<html>
Expand Down
2 changes: 1 addition & 1 deletion example/examples/NativeWebpage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { View } from 'react-native';

import WebView from 'react-native-webview';
import WebView from '@metamask/react-native-webview';

interface Props {}
interface State {}
Expand Down
2 changes: 1 addition & 1 deletion example/examples/OpenWindow.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {Button, Switch, StyleSheet, Text, View} from 'react-native';

import WebView from 'react-native-webview';
import WebView from '@metamask/react-native-webview';

const HTML = `
<!DOCTYPE html>\n
Expand Down
2 changes: 1 addition & 1 deletion example/examples/Scrolling.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {Button, Text, View} from 'react-native';

import WebView from 'react-native-webview';
import WebView from '@metamask/react-native-webview';

const HTML = `
<!DOCTYPE html>\n
Expand Down
2 changes: 1 addition & 1 deletion example/examples/Suppress.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { View } from 'react-native';

import WebView from 'react-native-webview';
import WebView from '@metamask/react-native-webview';

interface Props {}
interface State {}
Expand Down
2 changes: 1 addition & 1 deletion example/examples/Uploads.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {Button, Linking, Text, View} from 'react-native';

import WebView from 'react-native-webview';
import WebView from '@metamask/react-native-webview';

const HTML = `
<!DOCTYPE html>\n
Expand Down
8 changes: 4 additions & 4 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ PODS:
- React-jsinspector (0.71.12)
- React-logger (0.71.12):
- glog
- react-native-webview (13.4.0):
- react-native-webview-mm (13.6.3):
- React-Core
- React-perflogger (0.71.12)
- React-RCTActionSheet (0.71.12):
Expand Down Expand Up @@ -347,7 +347,7 @@ DEPENDENCIES:
- React-jsiexecutor (from `../../node_modules/react-native/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../../node_modules/react-native/ReactCommon/jsinspector`)
- React-logger (from `../../node_modules/react-native/ReactCommon/logger`)
- react-native-webview (from `../..`)
- react-native-webview-mm (from `../..`)
- React-perflogger (from `../../node_modules/react-native/ReactCommon/reactperflogger`)
- React-RCTActionSheet (from `../../node_modules/react-native/Libraries/ActionSheetIOS`)
- React-RCTAnimation (from `../../node_modules/react-native/Libraries/NativeAnimation`)
Expand Down Expand Up @@ -409,7 +409,7 @@ EXTERNAL SOURCES:
:path: "../../node_modules/react-native/ReactCommon/jsinspector"
React-logger:
:path: "../../node_modules/react-native/ReactCommon/logger"
react-native-webview:
react-native-webview-mm:
:path: "../.."
React-perflogger:
:path: "../../node_modules/react-native/ReactCommon/reactperflogger"
Expand Down Expand Up @@ -467,7 +467,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: a78a0e415dc4b786a4308becf3e3bc6dbbc7b92e
React-jsinspector: ec4dcbfb1f4e72f04f826a0301eceee5fa7ca540
React-logger: 35538accacf2583693fbc3ee8b53e69a1776fcee
react-native-webview: 64c9bf9646e7377240fb87d70f74556af6433143
react-native-webview-mm: fc383e3fbbdb4f7968484f03c6f086edfd74fd5d
React-perflogger: 75b0e25075c67565a830985f3c373e2eae5389e0
React-RCTActionSheet: a0c3e916b327e297d124d9ebe8b0c721840ee04d
React-RCTAnimation: 3da7025801d7bf0f8cfd94574d6278d5b82a8b88
Expand Down
8 changes: 4 additions & 4 deletions example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ PODS:
- React-jsinspector (0.71.33)
- React-logger (0.71.33):
- glog
- react-native-webview (13.3.1):
- react-native-webview-mm (13.6.3):
- React-Core
- React-perflogger (0.71.33)
- React-RCTActionSheet (0.71.33):
Expand Down Expand Up @@ -363,7 +363,7 @@ DEPENDENCIES:
- React-jsiexecutor (from `../../node_modules/react-native-macos/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../../node_modules/react-native-macos/ReactCommon/jsinspector`)
- React-logger (from `../../node_modules/react-native-macos/ReactCommon/logger`)
- react-native-webview (from `../..`)
- react-native-webview-mm (from `../..`)
- React-perflogger (from `../../node_modules/react-native-macos/ReactCommon/reactperflogger`)
- React-RCTActionSheet (from `../../node_modules/react-native-macos/Libraries/ActionSheetIOS`)
- React-RCTAnimation (from `../../node_modules/react-native-macos/Libraries/NativeAnimation`)
Expand Down Expand Up @@ -426,7 +426,7 @@ EXTERNAL SOURCES:
:path: "../../node_modules/react-native-macos/ReactCommon/jsinspector"
React-logger:
:path: "../../node_modules/react-native-macos/ReactCommon/logger"
react-native-webview:
react-native-webview-mm:
:path: "../.."
React-perflogger:
:path: "../../node_modules/react-native-macos/ReactCommon/reactperflogger"
Expand Down Expand Up @@ -484,7 +484,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: 9d1f2ab1d5bce258038eb202728210cab73581af
React-jsinspector: b482ed08c8233d528c5917e1a916827e2357ab24
React-logger: 9cca25c5cbc2bdc03dd79010992d17cbac337139
react-native-webview: c2b70afb1d910cdd8810375aecc6c2894e2ba061
react-native-webview-mm: fc383e3fbbdb4f7968484f03c6f086edfd74fd5d
React-perflogger: b2d0d3a34cb21df25dfdef7331c8eace64ebbac4
React-RCTActionSheet: e2852db033ff9909d9e31f78a16a8b1a0d72b0b3
React-RCTAnimation: af9d4eba93cbb7bf6b2b70ff30f4dde1ae47a4a6
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react-native-webview",
"name": "@metamask/react-native-webview",
"description": "React Native WebView component for iOS, Android, macOS, and Windows",
"main": "index.js",
"main-internal": "src/index.ts",
Expand All @@ -11,7 +11,7 @@
],
"license": "MIT",
"version": "13.6.3",
"homepage": "https://github.com/react-native-webview/react-native-webview#readme",
"homepage": "https://github.com/MetaMask/react-native-webview-mm#readme",
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
Expand Down Expand Up @@ -73,7 +73,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/react-native-webview/react-native-webview.git"
"url": "https://github.com/MetaMask/react-native-webview-mm.git"
},
"files": [
"android/src",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'

Pod::Spec.new do |s|
s.name = package['name']
s.name = 'react-native-webview-mm'
s.version = package['version']
s.summary = package['description']
s.license = package['license']
Expand All @@ -14,7 +14,7 @@ Pod::Spec.new do |s|
s.homepage = package['homepage']
s.platforms = { :ios => "9.0", :osx => "10.13" }

s.source = { :git => "https://github.com/react-native-webview/react-native-webview.git", :tag => "v#{s.version}" }
s.source = { :git => "https://github.com/MetaMask/react-native-webview-mm.git", :tag => "v#{s.version}" }

s.source_files = "apple/**/*.{h,m,mm,swift}"

Expand Down

0 comments on commit 6a621e1

Please sign in to comment.