Commit Graph

114 Commits

Author SHA1 Message Date
Christopher Pfohl 1bc38da53f
docs: update injectedJavascript ios docs (#1704 bu @Crisfole) 2020-10-21 08:52:28 -07:00
Kesha Antonov 22a60fd23a
feat(iOS): Add prop autoManageStatusBarEnabled (#914)
Co-authored-by: Jamon Holmgren <jamon@infinite.red>
Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
Co-authored-by: Thibault Malbranche <thibault.malbranche@epitech.eu>
2020-09-15 02:42:09 +02:00
Dominic Lee 40814101be
chore(docs): remove hash url change note (#1622) 2020-09-08 23:55:50 +02:00
Leonardo Russo db529e265f
Updated Guide.md for using injectedJavaScript (#1578)
https://github.com/react-native-community/react-native-webview/issues/1554
2020-08-25 15:02:13 +02:00
oliviacaraiman 9ffca8f9db
feat(android): Add androidLayerType as prop (#1588)
* Add androidLayerType as a prop

* Deprecate "androidHardwareAccelerationDisabled" prop

* Update reference

Co-authored-by: Olivia Caraiman <olcaraim@microsoft.com>
2020-08-24 14:23:38 +02:00
Sergei Butko a02d88f54f
feat(iOS): Add the pull to refresh (#1265)
* Add pull to refresh support for iOS

* Add pull to refresh control removal from WebView

* Add the type and reference description about pull to refresh

* Set bounces to true when enabling pull to refresh, add references

* Add the back to props anchor to pullToRefreshEnabled
2020-08-17 12:07:36 +02:00
Caleb Clarke 6a9116f2d1
feat(events): Add isTopFrame to shouldStartLoadForRequest (#1537)
* Add isTopFrame to shouldStartLoadForRequest on iOS

onLoadingStart is not raised for inner frames, but onShouldStartLoadWithRequest still is. This keeps that behavior but adds isTopFrame to onShouldStartLoadWithRequest so that apps can perform their own filtering if desired.

* Update docs

Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
2020-08-15 11:21:38 +02:00
Bryan Stearns 621d2df72e
chore(docs): Add a debugging note (#1517 by @BryanStearns)
[skip ci]

Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
2020-08-14 20:24:05 -07:00
Caleb Clarke 8b69452643
feat(ios): Add iOS contentMode property (#1538 by @TheAlmightyBob)
This allows overriding iPadOS 13's desktop-class browsing to load mobile content instead of desktop content.

Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
2020-08-14 20:16:54 -07:00
cristianoccazinsp 8a8b7ceb98
feat(android): WebView crash handling (#1480)
Co-authored-by: Cristiano Coelho <cristianocca@hotmail.com>
2020-08-06 22:21:01 +02:00
Dragoș Străinu 97aaf89037
docs(reference): add links to top with jump2header (#1528 by @strdr4605)
[skip ci]
2020-07-23 22:21:56 -07:00
Anton Vlasenko a2029d2d47
chore(docs): Fix broken link in docs/Guide.md (#1436 by @Sappphire64)
[skip ci]
2020-06-13 15:13:01 -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
Kai Guo e402e739ea
fix(windows): Add postMessage for Windows WebView (#1263 by @kaiguo) 2020-05-29 13:19:11 -07:00
Akinn Rosa 79eb905a97
chore(docs): Update brazilian translation and reference in main readme.. (#1332 by @akinncar)
[skip ci]
2020-05-28 16:55:00 -07:00
Colin 131dd9ebe8
chore(docs): Update link in custom-android docs (#1382 by @ColinRTaylor)
[skip ci]
2020-05-28 16:54:07 -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
Bengt Ove Sannes d9c73e0f6f
chore(docs): Update Guide.md (#1305 by @bovesan)
[skip ci]
2020-05-28 10:10:24 -07:00
trcoffman 91df544fae
feat(webview): Allow javascript to open windows automatically (#1409 by @trcoffman)
[skip ci]
2020-05-28 09:54:20 -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
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
RedPandaTronics d4ab332891
feat(iOS): Add Hardware Silence (#1218)
* Fixes Issue #1140

Fixes https://github.com/react-native-community/react-native-webview/issues/1140
Based on a solution found at: https://stackoverflow.com/questions/56460362/how-to-force-wkwebview-to-ignore-hardware-silent-switch-on-ios
I changed the code found in the linked source from Swift to Objective-C, as required by this project. WARNING: I haven't used Swift before and very limited experience with Objective-C.

- For me this seems to work, but it is not the cleanest solution in my opinion.
- It might also be possible to play generated sound (i.e. using oscillator) instead of hardcoding the silent base64 mp3 data.
- Maybe ignoring silence switch should only be done if a parameter is supplied

* fixes import path

* adds documentation for ignoreSilentHardwareSwitch

* adds ignoreSilentHardwareSwitch parameter

* reverting back to old import path

* Update Guide.md

Co-authored-by: Dominik Beste <dominik.beste@gmail.com>
2020-04-13 08:54:47 -07: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
Allan Santos 5024295633
chore(docs): Fix Getting Started Guide link in Breaking History (#1213) 2020-02-17 09:35:05 -08:00
António Goulão 6c8b8fc4b1
chore(docs): Update Android assets path (#1173) 2020-02-14 11:12:19 -08:00
Jason Safaiyeh 327bc6b7de
chore(docs): Update cookie links (#1149) 2020-02-13 05:50:22 -08:00
Tom Underhill 1e572318ec
feat(macOS): macOS Support (#1164) 2020-02-12 15:39:11 -08:00
Jason Safaiyeh 361529630f feat(ios): Generate history API events on iOS (#1082)
BREAKING CHANGE: if you use onNavigationStateChange on iOS it will now trigger on # changes to the url.

* Hook the `window.history` API on iOS to generate events

The underlying WKWebView doesn't seem to generate any events in response to the `window.history` API - none of the `WKNavigationDelegate` methods fire.

Given this limitation, the only way to know when the location changes via this API is to inject Javascript into the page and have it notify the native code directly when any of these functions are called.

The `setTimeout` call gives up the current tick, allowing the location to change before firing the event.

* Remove the outdated section about hash changes

Now that this bug is fixed, the workaround is no longer required.
2019-12-16 17:52:54 +01:00
StasD 88b64981f4 fix(ios): Make allowFileAccessFromFileURLs work in iOS. (#1061) 2019-12-06 11:16:56 +01:00
Salvatore Randazzo 604495e399 feat(iOS): new prop injectedJavaScriptBeforeContentLoaded (#1038)
* Run the injectedJavaScript on DocumentStart for iOS

* Add new prop injectedJavaScriptBeforeContentLoaded
Update types
Update docs

* Self review
2019-12-06 11:15:02 +01:00
Thibault Malbranche ef5c36c88e
chore(docs): Document request focus method 2019-11-13 10:43:25 +01:00
Stanislav Shakirov 4a4f4a2c45 feat(android): add clearHistory, clearCache and clearFormData (#450)
* add clearHistory, clearCache and clearFormData android webview api.

* remove pointless `async`

* add docs for new android webview methods

* Update Reference.md

* update commands types

* add more strict type for RNCWebViewUIManager `Commands` property
2019-11-12 10:09:16 +01:00
Dani Akash 6088dd9f06 chore(docs): Steps to load local HTML files into the webview (#1008)
Fixes #746 

These steps are based on my other project React native draftjs which requires loading a local HTML file. The code can be found in the following line - bc51410117/index.js (L113)
2019-11-12 10:06:35 +01:00
Rubensmp b92d6ae014 chore(docs): README.md translated into Brazilian portugues (#980)
I was using this solution a lot, so I decided to translate it into my language.
2019-11-12 09:48:24 +01:00
Jamon Holmgren 82af9559ef
chore(docs): Add in-page link to new guide
[skip ci]
2019-11-04 08:34:54 -08:00
Jamon Holmgren 8c9f986df0 chore(docs): Added guide for working with custom headers and cookies (#994)
* Added guide for working with custom headers and cookies

* Remove extraneous files
2019-11-04 17:30:51 +01:00
Jean Augusto de Caastro Costa c1b3696e01 chore(docs): Added missing word (#948) 2019-10-22 09:59:36 +02:00
Borut Balazek 4db3d84dda feat(android): allowFileAccessFromFileURLs prop added (#831)
* add allowFileAccessFromFileURLs propery to do the expected on android

* Added types

* Update WebViewTypes.ts
2019-09-29 15:50:39 +02:00
Andres Castano 5da59251ce feat(android): Expose cacheMode property (#895) 2019-09-29 15:45:20 +02:00
Marco Marinangeli 902d3d1e7f feat(new prop): containerStyle (#912)
* feat(new prop): containerStyle

* chore(docs): Add documentation for `containerStyle`
2019-09-29 15:43:48 +02:00
Tyler Alves fc59cae4bf fix(android): Filter extra onLoadProgress & add url event (#643)
* Filter out extra onLoadProgress calls; add url to onLoadProgress

* remove note about onLoadProgress not having the url property in docs

* Update Reference.md
2019-09-23 10:35:49 +02:00
Samuel Sieg a76811da93 feat(iOS): Add callback for webViewWebContentProcessDidTerminate (#774)
* Add callback for WKWebView's onContentProcessDidTerminate

* Add platform information to docs

* Add new WebViewTerminatedEvent type
2019-09-23 10:20:12 +02:00
Ezequiel Aceto 136fbd8491 feat(iOS): Allow custom CA to be used on webview requests (#865)
* Allow custom CA to be used on webview requests

* Add documentation and an example for Custom CA / SSL Pinning
2019-09-21 02:44:53 +02:00
Jason Chia-Hsien Ho 552472c414 feat(new prop): onHttpError callback (#885) 2019-09-21 02:43:28 +02:00
George Montana Harkin 36ffbe0700 chore(docs): Update "source" doc, baseUrl comments about CORS (#881)
After needing to see what the origin of a "html" source'd WebView would be, I found the documentation that baseUrl would be utilized for the "origin" header when CORS requests are made.
2019-09-19 11:18:59 +02:00
Thibault Malbranche 8549be5fd0
fix(iOS): UIWebView Removal (#828)
Apple required us to remove this (see #819)

BREAKING CHANGE: UIWebView has been removed
BREAKING CHANGE: useWebkit prop removal
BREAKING CHANGE: scalesPageToFit prop removal on iOS (since it's not compatible with WKWebview)
BREAKING CHANGE: Renamed RNCWKWebView to RNCWebView on iOS
2019-08-30 12:04:32 +02:00