Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
80d03e0
chore(windows): fix noisy warning (#2460)
asklar Apr 26, 2022
603c751
Fix Break From Pkg Ref Changes (#2459)
chiaramooney Apr 27, 2022
92ba4fa
fix(windows): update Getting Started information for Windows
chiaramooney Apr 27, 2022
f7cd6c4
chore(release): 11.18.2 [skip ci]
semantic-release-bot Apr 27, 2022
a36394f
chore(docs): fix ex, add js ex, add line, add closing backtick (#2444)
hslee2008 Apr 30, 2022
c3f73fe
feat(android): Adding downloadMessage as a prop for localization (#2489)
mmathewsTableau May 19, 2022
64d6821
chore(release): 11.19.0 [skip ci]
semantic-release-bot May 19, 2022
4cf05fc
chore(docs): Update Portuguese reference (add clearCache ex) (#2474)
hslee2008 May 20, 2022
eb4e923
feat(ios): adds allowsAirPlayForMediaPlayback prop (#2410 by @matinzd)
matinzd May 23, 2022
218ae30
chore(release): 11.20.0 [skip ci]
semantic-release-bot May 23, 2022
41ae896
fix(ios): support requestFocus (#2501)
pmusaraj May 28, 2022
5ffa17f
chore(release): 11.20.1 [skip ci]
semantic-release-bot May 28, 2022
5067dc2
chore(readme): update readme
Titozzz May 29, 2022
2e79a03
feat: improve dummy WebView (#2509)
Simek May 29, 2022
8611237
chore(release): 11.21.0 [skip ci]
semantic-release-bot May 29, 2022
dc050b5
chore: update Expo is supported platforms section (#2512)
Simek May 31, 2022
0571062
fix(windows): don't build WebView2 unless on WinUI 3 (#2517)
tido64 May 31, 2022
a1cb132
chore(release): 11.21.1 [skip ci]
semantic-release-bot May 31, 2022
ed3d6ed
Revert "fix(windows): don't build WebView2 unless on WinUI 3" (#2531)
tido64 Jun 7, 2022
ef76edf
chore(release): 11.21.2 [skip ci]
semantic-release-bot Jun 7, 2022
6b8e4f3
feat(refactor): remove findnodehandle, use function components & code…
Titozzz Jun 9, 2022
e0f79b4
chore(release): 11.22.0 [skip ci]
semantic-release-bot Jun 9, 2022
a68df85
chore(formatting): Re-indent the Objective-C code to 2 spaces (#2534)
matiaskorhonen Jun 10, 2022
ff08b11
fix(android): fixed issue with refactor
Titozzz Jun 10, 2022
7063c01
chore(release): 11.22.1 [skip ci]
semantic-release-bot Jun 10, 2022
c424a49
fix: Don't crash if trying to download "invalid" URIs on Android (#2432)
TheAlmightyBob Jun 12, 2022
2853bdd
chore(release): 11.22.2 [skip ci]
semantic-release-bot Jun 12, 2022
4b1f379
Implement postMessage/onMessage for Windows WebView2 (#2537)
chiaramooney Jun 15, 2022
53ff8fb
Change WindowsTargetPlatformVersion to 10.0 (#2521)
namrog84 Jun 17, 2022
453d22d
fix(iOS/macOS): re-added missing properties due to hooks refactor
hojunin Jun 21, 2022
771e5a8
chore(release): 11.22.3 [skip ci]
semantic-release-bot Jun 21, 2022
a2a2d0a
chore(docs): Fix the "register the module" link in the Custom Android…
TheAlmightyBob Jun 24, 2022
b7f5c6f
fix(windows): Refactor JS Code for Windows (#2554)
chiaramooney Jun 28, 2022
a0f1e26
chore(release): 11.22.4 [skip ci]
semantic-release-bot Jun 28, 2022
045fb60
fix(iOS): Adding the contentProcessDidTerminate property into useWebV…
david-moonsift Jul 6, 2022
4749dae
chore(release): 11.22.5 [skip ci]
semantic-release-bot Jul 6, 2022
3727f81
fix(windows): Add WinUI Version Opt In Functionality (#2575)
chiaramooney Jul 11, 2022
1cacde4
chore(release): 11.22.6 [skip ci]
semantic-release-bot Jul 11, 2022
7f78f20
fix(android): cacheEnabled - make compatible with android sdk-33 (#2583)
artyorsh Jul 12, 2022
2f47372
chore(release): 11.22.7 [skip ci]
semantic-release-bot Jul 12, 2022
b850d1d
feat(android): bump up kotlinVersion to 1.6.0 (#2592)
craftzdog Jul 25, 2022
7682669
chore(release): 11.23.0 [skip ci]
semantic-release-bot Jul 25, 2022
37c8d34
chore: bump react-native-test-app for TurboModule support (#2612)
tido64 Jul 29, 2022
dbb9a72
chore: Update README.portuguese.md (#2641)
dyegofern Aug 25, 2022
6c00c1f
fix(iOS): add null check safety for adding mainDocumentURL to event (…
HudiDev Sep 4, 2022
ceb5cc7
chore(release): 11.23.1 [skip ci]
semantic-release-bot Sep 4, 2022
c8258bc
chore(docs): add page navigation gesture & button support (#2609)
peterklingelhofer Sep 5, 2022
3a8ad10
chore(docs): Fix indentation in guide (#2685)
yenshirak Sep 27, 2022
c14dcc2
refactor(android): cleanup cacheEnabled prop (#2697)
matinzd Oct 6, 2022
d6af98f
chore(ci): Update React Native to fix Android build (#2734)
TheAlmightyBob Nov 9, 2022
a5e2a9f
chore(docs): Add information that custom menu items are only availabl…
Handschrift Nov 23, 2022
4ac0d74
feat(ios): Cookie sync improvements (#2535)
matiaskorhonen Nov 23, 2022
70e84de
chore(release): 11.24.0 [skip ci]
semantic-release-bot Nov 23, 2022
2711f3a
feat(Android): Handle RESOURCE_PROTECTED_MEDIA_ID permission (#2732)
enzo-macri Nov 26, 2022
0817524
chore(release): 11.25.0 [skip ci]
semantic-release-bot Nov 26, 2022
47c05b0
fix(android): Respect "filename*" parameter in the field Content-Disp…
UNIDY2002 Dec 7, 2022
ffaef12
chore(release): 11.25.1 [skip ci]
semantic-release-bot Dec 7, 2022
9b7ce57
feat(macos): Support File Input On Macos (#2733)
17Amir17 Dec 9, 2022
2ad3ce6
chore(release): 11.26.0 [skip ci]
semantic-release-bot Dec 9, 2022
4c05077
chore: Update Getting-Started.md (#2791)
Gregory-Coelho Dec 29, 2022
f74ee7a
fix(js): messagingEnabled prop (#2666)
TheAlmightyBob Jan 16, 2023
130d64f
chore(docs): Add info/warning about injectedJavaScriptBeforeContentLo…
TheAlmightyBob Jan 16, 2023
7d605d3
chore: bump react-native-macos to 0.68 (#2828)
tido64 Jan 27, 2023
9051762
chore(release): 11.26.1 [skip ci]
semantic-release-bot Jan 27, 2023
f0aa7b9
chore(docs): Fix clearCache link in index (#2814)
Reisclef Jan 27, 2023
1707328
chore(docs): README fixes: badge, minor wording tweaks (#2880)
jamonholmgren Mar 3, 2023
a6c8d28
chore: Update Guide.md (#2906)
pa-bouly Apr 1, 2023
5558e28
feat: Fabric support (#2686)
Titozzz Apr 1, 2023
b22d25f
chore(release): 12.0.0 [skip ci]
semantic-release-bot Apr 1, 2023
a2eec17
fix(iOS): Foundation Import (#2917)
Titozzz Apr 4, 2023
64a3469
chore(release): 12.0.1 [skip ci]
semantic-release-bot Apr 4, 2023
4d0c0de
fix(ios): fix userAgent ios type comment (#2888)
TheKohan Apr 6, 2023
681aac4
chore(release): 12.0.2 [skip ci]
semantic-release-bot Apr 6, 2023
81e3aa4
fix(Android): Don't crash while downloading file with % in filename (…
valentinaporch May 22, 2023
d8442dc
chore(release): 12.0.3 [skip ci]
semantic-release-bot May 22, 2023
379fa9f
bump min version (#2955)
TatianaKapos May 22, 2023
ed00b17
chore: fix typo (#2868)
hyp3rflow May 22, 2023
39ce007
feat: make pushState changes trackable on android (#2929)
peterlazar1993 May 23, 2023
3928573
chore(release): 12.1.0 [skip ci]
semantic-release-bot May 23, 2023
75e7801
Missing android.support.FILE_PROVIDER_PATHS meta-data on some OEMs (#…
mganandraj Jun 1, 2023
1851ead
feat(windows): Support headers and cookies in source prop (#2897)
vahagnni Jun 1, 2023
fe36eff
chore(release): 12.2.0 [skip ci]
semantic-release-bot Jun 1, 2023
e17a79b
fix: Revert "Missing android.support.FILE_PROVIDER_PATHS meta-data on…
Titozzz Jun 10, 2023
224e283
chore(release): 12.2.1 [skip ci]
semantic-release-bot Jun 10, 2023
f2aef66
feat: custom action menu on android + improved iOS (#2993)
Titozzz Jun 10, 2023
c6125b0
chore(release): 12.3.0 [skip ci]
semantic-release-bot Jun 10, 2023
f9a5277
feat: debugging enabled prop (#2937)
Tom-Bury Jun 10, 2023
79a9cb6
chore(release): 12.4.0 [skip ci]
semantic-release-bot Jun 10, 2023
40c9807
feat: Allow webview to load in background tab (#2930)
peterlazar1993 Jun 10, 2023
9e86156
chore(release): 13.0.0 [skip ci]
semantic-release-bot Jun 10, 2023
6d185e6
feat(iOS): fraudulent website warning setting (previously #2801) (#2994)
Titozzz Jun 10, 2023
0a5bbe7
chore(release): 13.1.0 [skip ci]
semantic-release-bot Jun 10, 2023
966221e
feat(android): Add support for the `capture` attribute (#2954)
robxyy Jun 11, 2023
a680662
chore(release): 13.2.0 [skip ci]
semantic-release-bot Jun 11, 2023
7ceeb2f
fix: build on 0.72 new arch (#2997)
Titozzz Jun 12, 2023
4a7e7cd
chore(release): 13.2.1 [skip ci]
semantic-release-bot Jun 12, 2023
41576ca
fix(macOS): address regression due to didMoveToSuperview (#3006)
vahagnni Jun 14, 2023
891e595
chore(release): 13.2.2 [skip ci]
semantic-release-bot Jun 14, 2023
103e0fd
Merge branch 'master' into 11.18.1-discord-1-merge-master-new-arch
Jul 26, 2023
3a091aa
fix Android build errors
Aug 7, 2023
d91b18a
fix iOS build errors
Aug 7, 2023
38f543f
fix iOS build errors
Aug 8, 2023
477ba2b
more Android fixes. add some temporary parent node logic
Aug 9, 2023
e47e34c
[ios] pass web view key and temporary parent node tags from props to …
Aug 9, 2023
8d41b37
cleanup
Aug 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defaults: &defaults
working_directory: ~/code
docker:
- image: cimg/node:14.17.6-browsers
- image: cimg/node:18.13.0-browsers

version: 2
jobs:
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,28 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
newArchEnabled: [false, true]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v2.5.1
uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18
cache: 'yarn'
- name: Set up JDK
uses: actions/setup-java@v2.5.0
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Cache /node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: Install npm dependencies
run: yarn --frozen-lockfile
shell: bash
- name: Build Android test app
uses: gradle/gradle-build-action@v2.1.3
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: --no-daemon clean build check test
arguments: -PnewArchEnabled=${{matrix.newArchEnabled}} --no-daemon clean build check test
build-root-directory: example/android
timeout-minutes: 60
17 changes: 8 additions & 9 deletions .github/workflows/ios-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@ on:
pull_request:
jobs:
build:
strategy:
matrix:
extraEnv: [FOO=BAR, RCT_NEW_ARCH_ENABLED=1]
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v2.5.1
uses: actions/setup-node@v3
with:
node-version: 16
- name: Cache /node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
node-version: 18
cache: 'yarn'
- name: Install npm dependencies
run: yarn --frozen-lockfile
- name: Install Pods
run: pod install
run: ${{matrix.extraEnv}} pod install
working-directory: example/ios
- name: Build iOS test app
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: Install npm dependencies
run: yarn --frozen-lockfile
- name: Install macos dependencies
run: yarn add:macos
- name: Install Pods
run: pod install
working-directory: example/macos
Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,28 @@ on: [pull_request]
jobs:
run-windows-tests:
name: Build & run tests
runs-on: windows-2019
runs-on: windows-2022

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
name: Checkout Code

- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '^14'
cache: 'yarn'

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.0.2

- name: Check node modules cache
uses: actions/cache@v1
id: yarn-cache
uses: microsoft/setup-msbuild@v1.1.3
with:
path: ./node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
vs-version: '[17.0,)'
msbuild-architecture: x64

- name: Install node modules
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --pure-lockfile

- name: yarn build
if: steps.yarn-cache.outputs.cache-hit == 'true'
run: |
yarn build
yarn tsc
Expand Down
98 changes: 35 additions & 63 deletions README.md

Large diffs are not rendered by default.

182 changes: 70 additions & 112 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,137 +1,95 @@
buildscript {
ext.getExtOrDefault = {name ->
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['ReactNativeWebView_' + name]
}
import java.nio.file.Paths

// The Android Gradle plugin is only required when opening the android folder stand-alone.
// This avoids unnecessary downloads and potential conflicts when the library is included as a
// module dependency in an application project.
if (project == rootProject) {
repositories {
mavenCentral()
google()
}

dependencies {
classpath("com.android.tools.build:gradle:3.6.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}")
buildscript {
ext.safeExtGet = {prop ->
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : project.properties['ReactNativeWebView_' + prop]
}
} else {
repositories {
mavenCentral()
google()
gradlePluginPortal()
}

dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion')}")
classpath("com.android.tools.build:gradle:7.0.4")
}
}
}

def getExtOrIntegerDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['ReactNativeWebView_' + name]).toInteger()
def getExtOrIntegerDefault(prop) {
return rootProject.ext.has(prop) ? rootProject.ext.get(prop) : (project.properties['ReactNativeWebView_' + prop]).toInteger()
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
defaultConfig {
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
static def findNodeModulePath(baseDir, packageName) {
def basePath = baseDir.toPath().normalize()
// Node's module resolution algorithm searches up to the root directory,
// after which the base path will be null
while (basePath) {
def candidatePath = Paths.get(basePath.toString(), "node_modules", packageName)
if (candidatePath.toFile().exists()) {
return candidatePath.toString()
}
basePath = basePath.getParent()
}
}
lintOptions {
disable 'GradleCompatible'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
return null
}

repositories {
mavenCentral()
google()

def found = false
def defaultDir = null
def androidSourcesName = 'React Native sources'

if (rootProject.ext.has('reactNativeAndroidRoot')) {
defaultDir = rootProject.ext.get('reactNativeAndroidRoot')
} else {
defaultDir = new File(
projectDir,
'/../../../node_modules/react-native/android'
)
}

if (defaultDir.exists()) {
maven {
url defaultDir.toString()
name androidSourcesName
}

logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}")
found = true
} else {
def parentDir = rootProject.projectDir
def isNewArchitectureEnabled() {
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}

1.upto(5, {
if (found) return true
parentDir = parentDir.parentFile

def androidSourcesDir = new File(
parentDir,
'node_modules/react-native'
)
apply plugin: 'com.android.library'
if (isNewArchitectureEnabled()) {
apply plugin: 'com.facebook.react'
}
apply plugin: 'kotlin-android'

def androidPrebuiltBinaryDir = new File(
parentDir,
'node_modules/react-native/android'
)
android {
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')

if (androidPrebuiltBinaryDir.exists()) {
maven {
url androidPrebuiltBinaryDir.toString()
name androidSourcesName
}
defaultConfig {
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
}

logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}")
found = true
} else if (androidSourcesDir.exists()) {
maven {
url androidSourcesDir.toString()
name androidSourcesName
sourceSets {
main {
if (isNewArchitectureEnabled()) {
java.srcDirs += ['src/newarch']
} else {
java.srcDirs += ['src/oldarch']
}
}
}
}

logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}")
found = true
}
})
}

if (!found) {
throw new GradleException(
"${project.name}: unable to locate React Native android sources. " +
"Ensure you have you installed React Native as a dependency in your project and try again."
)
}
def reactNativePath = findNodeModulePath(projectDir, "react-native")
def codegenPath = findNodeModulePath(projectDir, "@react-native/codegen")
if (codegenPath == null) {
// Compat for 0.71 and lower (to be removed)
codegenPath = findNodeModulePath(projectDir, "react-native-codegen")
}

def kotlin_version = getExtOrDefault('kotlinVersion')
def webkit_version = getExtOrDefault('webkitVersion')
repositories {
maven {
url "${reactNativePath}/android"
}
mavenCentral()
google()
}

dependencies {
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "androidx.webkit:webkit:$webkit_version"
implementation 'com.facebook.react:react-native:+'
implementation "org.jetbrains.kotlin:kotlin-stdlib:${safeExtGet('kotlinVersion')}"
implementation "androidx.webkit:webkit:${safeExtGet('webkitVersion')}"
}

if (isNewArchitectureEnabled()) {
react {
jsRootDir = file("../src/")
libraryName = "rncwebview"
codegenJavaPackageName = "com.reactnativecommunity.webview"
codegenDir = new File(codegenPath)
reactNativeDir = new File(reactNativePath)
}
}
5 changes: 2 additions & 3 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ReactNativeWebView_kotlinVersion=1.6.0
ReactNativeWebView_webkitVersion=1.4.0
ReactNativeWebView_compileSdkVersion=29
ReactNativeWebView_buildToolsVersion=29.0.3
ReactNativeWebView_targetSdkVersion=28
ReactNativeWebView_compileSdkVersion=31
ReactNativeWebView_targetSdkVersion=31
ReactNativeWebView_minSdkVersion=21
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.reactnativecommunity.webview;

class RNCBasicAuthCredential {
String username;
String password;

RNCBasicAuthCredential(String username, String password) {
this.username = username;
this.password = password;
}
}
Loading