Commit Graph

24 Commits

Author SHA1 Message Date
Roman Volosovskyi ded5475692
Don't allow camera and mic permissions by default.
Notify user about permission request
2022-01-10 14:57:09 +03:00
Alexander Sklar aafa8991f5
fix(windows): Simplify project structure, fix arm64 (#2211)
* Merge web bridge project into webview project

* merge in webview sln too

* merge in react-native.config.js

* fix includes

* Bring RN version back to 62.2
2021-11-12 10:41:40 -08:00
Kirill 283c18b379
fix(jcenter): remove jcenter (#2178)
Builds will no longer be able to resolve artifacts from JCenter after February 1st, 2022 because jcenter servers shut down

so, i remove jcenter and update react-native (since 0.65.1 they don't use jcenter)

Co-authored-by: bibazavr <lebedevki@lad24.ru>
2021-09-27 13:50:52 +02:00
Alexander Sklar e3e6e6841a
fix(windows): Fix ARM/ARM64 support (#2044) 2021-06-11 08:33:56 -07:00
Nizam Moidu 30685edda0
feat(ios): Apple Pay support (#1946)
* Apple Pay support in ios Webview

* Apple Pay example

* rename prop to enableApplePay

* disable js evaluation if enableApplePay set to true

* documentation update for apple pay support
2021-05-21 00:17:24 +02:00
Chiara Mooney 9114b78d41
fix(autolink-windows): enable autolinking on Windows
* Reset Project to Single Package

* Update CI

* Resolve Conflicts

* Update Publisher Name
2021-04-26 08:40:20 -07:00
John Kennedy Mumo d352d147bd
feat(windows): Add POST requests, fixes Windows CI issues, and other QOL (#1926)
* Added POST request support for Windows.

* Cleanup formatting for docs

* Updated test certificate

* Reverted publisher name and fixed password mismatch

* Fixes to Windows tests

* Remove winappdriver install

* Run react-native server in background

* Added url encoded form support

* Added support for custom headers

Co-authored-by: Kennedy Mumo <kemumo@microsoft.com>
2021-04-14 01:40:49 +02:00
Lorenzo Sciandra 194c6a2335
feat(android): Introduce setSupportMultipleWindows to mitigate CVE-2020-6506 (#1747 by @mrcoinbase and @kelset -- THANK YOU!)
BREAKING CHANGE:

This release introduces the `setSupportMultipleWindows` prop for Android. This sets the underlying Android WebView setting `setSupportMultipleWindows`. This prop defaults to `true` (previously `false`), and serves to mitigate the security advisory [CVE-2020-6506](https://github.com/react-native-webview/react-native-webview/security/advisories/GHSA-36j3-xxf7-4pqg).

The primary way this new behavior changes existing React Native WebView implementations on Android is that links that open in new tabs/windows (such as `<a target="_blank">`) will now prompt to open in the system browser, rather than re-using the current WebView.

If this behavior is not desirable, you can set this new prop to `false`, but be aware that this exposes your app to the security vulnerability listed above. Make sure you have read and understand the whole advisory and relevant links.

iOS & Windows are unaffected.

```jsx
<WebView
  // ...
  setSupportMultipleWindows={true} // default: true
/>
```

Thanks to @mrcoinbase, @kelset, and @Titozzz for their work on this.
2020-11-24 09:15:19 -08:00
Tero Paananen b930e25a8f
feat(windows): JS-WebView messaging bridge & multiple WebViews fixes (#1617)
* Manage to build webview using Visual Studio

* WebView in content of UserControl

* Destructor not needed

* Example app tested

* Add messagingEnabled prop

* WebViewBridge

* Message posting

* Store bridge as instance variable

* Use bridge if messagingEnabled

* Free event delegate

* PostMessage api uses string message

* script.notify() usage removed

* Debug log removed

* Bridge reference added

* Base for web allowed object implemented c++/winrt

* Bribge works

* "Microsoft.Windows.CppWinRT" version="2.0.200729.8"

* Update bridge implementation

* version changes

* Reference fix

* WebView prj builds

* yarn lock update

* Platfrom version update

* NuGet package reference updated

* Messaging test added into example app

* Typo fix

* try_as() to as() calls

* WebView.PostMessage() not supported anymore, use injectJavaScript

* Fix WebView.postMessage to work using injectJavascript

* Eval postMessage fix

* postMessage via injectJavascript

* Example fixed to handle postMessage call
2020-10-26 14:01:40 +01:00
trcoffman b0ac0c15be
chore(windows): Add a .gitattributes to fix line endings across myriad files. (#1431 by @trcoffman)
[skip ci]
2020-06-16 11:53:22 -07:00
Salvatore Randazzo ac4e05e0f2
feat(android): Add support for injectedJavaScriptBeforeContentLoaded on Android (#1099 by @SRandazzo and @ @shirakaba) 2020-06-13 13:54:48 -07:00
Karthik Subramaniam 03dbcb870e
fix(android): Updated permissions for Android Q and above (#1384 by @Karthz) 2020-05-28 16:47:26 -07:00
Jussi Kinnula 228f10d917
feat(compatibility): Support React Native 0.62 (#1364 by @jussikinnula and @kaiguo)
Co-authored-by: Kai Guo <kaigu@microsoft.com>
Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
2020-05-26 20:55:02 -07:00
Kai Guo 20a3f90c0f
fix(windows): Fix windows local asset path (#1335 by @kaiguo)
[skip ci]
2020-05-15 15:34:55 -07:00
Kai Guo ef3ceb24d1
chore(windows): Set up Windows CI (#1358 by @kaiguo)
[skip ci]
2020-05-08 13:24:37 -07:00
trcoffman a6010d93e0
feat(iOS): Add onFileDownload callback (#1214)
`onFileDownload` is called with the URL that you can use to download the file.
When RNCWebView detects that the HTTP response should result in a file download,
`onFileDownload` is called. The client can then provide code to download
the file.

RNCWebView determines that a file download should take place if either of the
following is true:
1. The HTTP response contains a `Content-Disposition` header that is of type
  'attachment'
2. The MIME type of the response cannot be rendered by the iOS WebView
2020-04-29 09:09:22 -07:00
Eloy Durán 2d9b0803e0
feat(macOS): Make podspec compatible with macOS (#1328)
* [apple] Move iOS/macOS src into common apple dir

* [apple] Enable macOS as platform in podspec

* [example] Use CocoaPods & auto-linking on macOS

* [docs] Update setup for macOS

* [package] Include apple dir in distribution
2020-04-24 19:54:17 +02:00
Jamie Birch 9cb2f6e2f3
feat(iOS): WKUserScripts (e.g. injectedJavaScript) can now update upon props change; and can be configured to inject into all frames. (#1119)
BREAKING CHANGE: 
• Props updates to `injectedJavaScript` are no longer immutable.

• `injectedJavaScript` no longer attaches a `jsEvaluationValue` property to the `onLoadingFinish` event. Check out: https://github.com/react-native-community/react-native-webview/pull/1119#issuecomment-574919464 to migrate with the same behavior.
2020-03-17 14:01:20 -07:00
Kai Guo ffee0d4362
feat(Windows): Windows support! (#1220) 2020-03-16 19:30:25 -07:00
Luciano Lima 86c44588f8
chore(docs): Update React Native links to reactnative.dev (#1233) 2020-02-25 22:54:06 -08:00
Daniel Vicory 4093682e08
fix(Android): Don't show camera options for a file upload when they can not be used (#1210)
* Don't show camera options for a file upload that would result in nothing happening for the user.

On Android, if the application declares the camera permission, then even intents
that use the camera require permission to be granted. This is a problem for apps
that combine an in-app camera with a WebView that has file uploading and the user
has not given permission for the camera.

Note, this will not request permission for camera. This will simply prevent
showing the camera options that would be a no-op action for users. It does this
by checking if the camera permission is declared, and if so, checks that the
user has granted permission.

More information: https://blog.egorand.me/taking-photos-not-so-simply-how-i-got-bitten-by-action_image_capture/

* Add example and documentation about camera option availability in file uploads for Android.
2020-02-18 18:40:30 -08:00
Tom Underhill 1e572318ec
feat(macOS): macOS Support (#1164) 2020-02-12 15:39:11 -08:00
Tom Underhill bf1d645716 chore(example): Added three test examples: Alerts, Scrolling, and Background. 2020-01-21 11:39:40 -08:00
Jesse Katsumata 3a9218031f chore(example): Added example app 2020-01-16 14:49:10 -08:00