Commit Graph

23 Commits

Author SHA1 Message Date
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
Salvatore Randazzo 571fb8df79
fix(iOS): injectedJavaScriptBeforeContentLoaded now runs when messaging is not enabled (#1286) 2020-04-07 09:59:52 -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
Tom Underhill 1e572318ec
feat(macOS): macOS Support (#1164) 2020-02-12 15:39:11 -08:00
Jamie Birch 5e8b4d5c2b chore(iOS): Extract wkWebViewConfig setup to setUpWkWebViewConfig function 2020-01-07 22:27:53 -08:00
sunzhongliang 4f4644ffd8 fix(iOS): WKWebView RetainCycle (#1096) 2019-12-27 11:39:53 +01:00
Ben Wildeman adb5608116 fix(iOS): Ignore WebKitDomainError 101 (#961) 2019-12-17 10:55:26 +01: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
Dima Paloskin 09372c9d95 fix(iOS): hideKeyboardAccessoryView on iPads (#661) 2019-09-27 01:27:42 +02:00
Abraham Przewodnik 05e2d27662 fix(iOS): Fix changing notification bars #735 (#898)
UIWindowDidBecomeVisibleNotification and UIWindowDidBecomeHiddenNotification seem far more reliable at detecting fullscreen video.

Tested on iOS 11, 12 and 13
2019-09-27 01:22:07 +02:00
jnpdx 6cfdd4b88c fix(iOS): Xcode issues and warnings (no functionality changes) (#860)
* Fix Xcode warnings (enums, whitespace, string literals)

* Add nullability notations
2019-09-23 10:49:06 +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
Wilson d25b20ac03 fix(iOS): inconsistent backgroundColor (#868)
* fix inconsistent backgroundColor

* remove redundant setBackgroundColor
2019-09-21 02:39:06 +02:00
hank121314 c366fdf2e7 fix(iOS): use RCTConvert to convert allowingReadAccessToURL. (#845)
* fix(ios):use RCTConvert to convert url instead of using URLWithStringg

* fix(iOS):remove stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding, because it's deprecated in iOS 9
2019-09-05 15:13:33 +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
Jamon Holmgren 52fbf09e29 🦅 WIP: Update to WKWebView - Replace UIWebView with WKWebView 2018-09-07 21:11:49 -07:00
Jamon Holmgren bc3be5ecaa Removes copyright notices from file headers 2018-08-15 19:25:15 -07:00
Jamon Holmgren bd2c3bc8c2 iOS Webview now using local RNCWebView 2018-08-03 00:12:40 -07:00
Jamon Holmgren 52ba380e4a Added RNCWebViewManager to xcode proj 2018-08-02 23:52:31 -07:00