|
1 | 1 | # React Native WebView |
2 | 2 |
|
3 | | - |
4 | | -[](http://makeapullrequest.com) |
5 | | -[](https://www.npmjs.com/package/react-native-webview) |
6 | | - |
| 3 | +A forked version of React Native WebView customized for CoolBitX Technology projects. |
7 | 4 |
|
8 | | -**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)). |
| 5 | +## 🚀 Getting Started |
9 | 6 |
|
10 | | -### Maintainers |
| 7 | +### Clone and Install |
11 | 8 |
|
12 | | -**Many thanks to these companies** for providing us with time to work on open source. |
13 | | -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.** |
| 9 | +```bash |
| 10 | +# Clone the repository |
| 11 | +git clone https://github.com/CoolBitX-Technology/react-native-webview.git |
14 | 12 |
|
15 | | -- [Thibault Malbranche](https://github.com/Titozzz) ([Twitter @titozzz](https://twitter.com/titozzz)) from [Brigad](https://www.brigad.co/en-gb/about-us) |
16 | | -[*Sponsor me* ❤️ !](https://github.com/sponsors/Titozzz) |
| 13 | +# Navigate to project directory |
| 14 | +cd react-native-webview |
17 | 15 |
|
| 16 | +# Install dependencies |
| 17 | +yarn install |
| 18 | +``` |
18 | 19 |
|
19 | | -Windows and macOS are managed by Microsoft, notably: |
20 | | -- [Alexander Sklar](https://github.com/asklar) ([Twitter @alexsklar](https://twitter.com/alexsklar)) from [React Native for Windows](https://microsoft.github.io/react-native-windows/) |
21 | | -- [Chiara Mooney](https://github.com/chiaramooney) from [React Native for Windows @ Microsoft](https://microsoft.github.io/react-native-windows/) |
22 | | - |
23 | | -Shout-out to [Jamon Holmgren](https://github.com/jamonholmgren) from [Infinite Red](https://infinite.red) for helping a lot with the repo when he had more available time. |
24 | | - |
25 | | -### Disclaimer |
26 | | - |
27 | | -Maintaining WebView is very complex because it is often used for many different use cases (rendering SVGs, PDFs, login flows, and much more). We also support many platforms and both architectures of react-native. |
28 | | - |
29 | | -Since WebView was extracted from the React Native core, nearly 500 pull requests have been merged. |
30 | | -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.** |
31 | | - |
32 | | -### Platform compatibility |
33 | | - |
34 | | -This project is compatible with **iOS**, **Android**, **Windows** and **macOS**. |
35 | | -This project supports both **the old** (paper) **and the new architecture** (fabric). |
36 | | -This project is compatible with [expo](https://docs.expo.dev/versions/latest/sdk/webview/). |
37 | | - |
38 | | -### Getting Started |
39 | | - |
40 | | -Read our [Getting Started Guide](docs/Getting-Started.md). If any step seems unclear, please create a pull request. |
| 20 | +### Build for Android |
41 | 21 |
|
42 | | -### Versioning |
| 22 | +```bash |
| 23 | +# Run Android example app |
| 24 | +yarn run android |
| 25 | +``` |
43 | 26 |
|
44 | | -This project follows [semantic versioning](https://semver.org/). We do not hesitate to release breaking changes but they will be in a major version. |
| 27 | +> **Note**: Once the build is complete, the example app will automatically open on your connected Android device or emulator. |
45 | 28 |
|
46 | | -### Usage |
| 29 | +## 📦 Publishing |
47 | 30 |
|
48 | | -Import the `WebView` component from `react-native-webview` and use it like so: |
| 31 | +### 1. Update Version |
49 | 32 |
|
50 | | -```tsx |
51 | | -import React, { Component } from 'react'; |
52 | | -import { StyleSheet, Text, View } from 'react-native'; |
53 | | -import { WebView } from 'react-native-webview'; |
| 33 | +Update the version in `package.json`: |
54 | 34 |
|
55 | | -// ... |
56 | | -const MyWebComponent = () => { |
57 | | - return <WebView source={{ uri: 'https://reactnative.dev/' }} style={{ flex: 1 }} />; |
| 35 | +```json |
| 36 | +{ |
| 37 | + "version": "13.13.4-cbx.6" |
58 | 38 | } |
59 | 39 | ``` |
60 | 40 |
|
61 | | -For more, read the [API Reference](./docs/Reference.md) and [Guide](./docs/Guide.md). If you're interested in contributing, check out the [Contributing Guide](./docs/Contributing.md). |
| 41 | +**Example**: `13.13.4-cbx.5` → `13.13.4-cbx.6` |
| 42 | + |
| 43 | +### 2. Publish to NPM |
62 | 44 |
|
63 | | -### Common issues |
| 45 | +```bash |
| 46 | +yarn run publish:npm |
| 47 | +``` |
64 | 48 |
|
65 | | -- 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 |
66 | | -- 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) |
| 49 | +When prompted, enter the new version (e.g., `13.13.4-cbx.6`). |
67 | 50 |
|
68 | | -#### Contributing |
| 51 | +> **Note**: Two-factor authentication is required for NPM publishing. |
69 | 52 |
|
70 | | -Contributions are welcome, see [Contributing.md](https://github.com/react-native-webview/react-native-webview/blob/master/docs/Contributing.md) |
| 53 | +### 3. Verify Publication |
71 | 54 |
|
72 | | -### License |
| 55 | +After successful publication, verify the new version at: |
| 56 | +📍 [https://www.npmjs.com/package/@coolwallet-app/react-native-webview](https://www.npmjs.com/package/@coolwallet-app/react-native-webview) |
73 | 57 |
|
74 | | -MIT |
| 58 | +## 🔗 Links |
75 | 59 |
|
76 | | -### Translations |
| 60 | +- **NPM Package**: [@coolwallet-app/react-native-webview](https://www.npmjs.com/package/@coolwallet-app/react-native-webview) |
| 61 | +- **Original Repository**: [react-native-webview/react-native-webview](https://github.com/react-native-webview/react-native-webview) |
77 | 62 |
|
78 | | -This readme is available in: |
| 63 | +## 📄 License |
79 | 64 |
|
80 | | -- [Brazilian portuguese](docs/README.portuguese.md) |
81 | | -- [French](docs/README.french.md) |
82 | | -- [Italian](docs/README.italian.md) |
| 65 | +This project maintains the same license as the original react-native-webview project. |
0 commit comments