react-native-webview/ios
Thibault Malbranche f3bdab5a22
feat(Android/iOS postMessage): refactoring the old postMessage implementation (#303)
fixes #29
fixes #272
fixes #221
fixes #105
fixes #66

BREAKING CHANGE: Communication from webview to react-native has been completely rewritten. React-native-webview will not use or override window.postMessage anymore. Reasons behind these changes can be found throughout so many issues that it made sense to go that way.

Instead of using window.postMessage(data, *), please now use window.ReactNativeWebView.postMessage(data).

Side note: if you wish to keep compatibility with the old version when you upgrade, you can use the injectedJavascript prop to do that:

const injectedJavascript = `(function() {
  window.postMessage = function(data) {
    window.ReactNativeWebView.postMessage(data);
  };
})()`;

Huge thanks to @jordansexton and @KoenLav!
2019-02-01 18:37:28 +01:00
..
RNCWebView.xcodeproj feat(WKWebview): Add shared process pool so cookies and localStorage are shared across webviews in iOS (#138) 2019-01-07 15:19:32 +01:00
RNCUIWebView.h Native Changes 2018-09-18 18:32:16 +02:00
RNCUIWebView.m feat(Android/iOS postMessage): refactoring the old postMessage implementation (#303) 2019-02-01 18:37:28 +01:00
RNCUIWebViewManager.h Native Changes 2018-09-18 18:32:16 +02:00
RNCUIWebViewManager.m Native Changes 2018-09-18 18:32:16 +02:00
RNCWKProcessPoolManager.h feat(WKWebview): Add shared process pool so cookies and localStorage are shared across webviews in iOS (#138) 2019-01-07 15:19:32 +01:00
RNCWKProcessPoolManager.m feat(WKWebview): Add shared process pool so cookies and localStorage are shared across webviews in iOS (#138) 2019-01-07 15:19:32 +01:00
RNCWKWebView.h feat(iOS/Android): Add `cacheEnabled` prop (#152) 2019-01-30 10:32:46 +01:00
RNCWKWebView.m feat(Android/iOS postMessage): refactoring the old postMessage implementation (#303) 2019-02-01 18:37:28 +01:00
RNCWKWebViewManager.h Native Changes 2018-09-18 18:32:16 +02:00
RNCWKWebViewManager.m feat(iOS/Android): Add `cacheEnabled` prop (#152) 2019-01-30 10:32:46 +01:00