-
Notifications
You must be signed in to change notification settings - Fork 984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use community WebView #10090
Use community WebView #10090
Conversation
Pull Request Checklist
|
Jenkins BuildsClick to see older builds (48)
|
032f4a6
to
c3c9d39
Compare
1 similar comment
As far as I can tell
Which means that the The simplest solution I can see is to create a commit that includes the result of |
It does work on a test RN project though, which is weird. Docs say it should run on local npm install, and it seems to work in that case. |
d63dd85
to
3df3fc2
Compare
2 similar comments
5e5eb0b
to
25fe775
Compare
25fe775
to
c2890c4
Compare
@@ -52,5 +52,6 @@ public ReactNativeHost getReactNativeHost() { | |||
public void onCreate() { | |||
super.onCreate(); | |||
SoLoader.init(this, /* native exopackage */ false); | |||
WebView.setWebContentsDebuggingEnabled(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why BuildConfig.DEBUG_WEBVIEW == "1")
isn't used? don't think we want this enabled in release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, sorry, did not know about the flag. Will fix.
@@ -231,7 +231,7 @@ public void onRequestPermissionsResult(int requestCode, String[] permissions, in | |||
} | |||
if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { | |||
// Permission has been granted. Start camera preview Activity. | |||
com.github.alinz.reactnativewebviewbridge.WebViewBridgeManager.grantAccess(requestCode); | |||
//com.github.alinz.reactnativewebviewbridge.WebViewBridgeManager.grantAccess(requestCode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add a comment in code, why it was commented ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will simply remove the line, it's not used any more.
@@ -21,6 +21,7 @@ | |||
# $keytool -genkey -v -keystore ./status-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias status | |||
|
|||
# Version requirements used throughout the Gradle scripts | |||
kotlinVersion=1.3.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this needed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it, android builds were failing (specifically make run-android
command for me). I'll uncomment and will check if it's still reproducible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's still reproducible:
A problem occurred configuring project ':react-native-webview'.
> Could not resolve all artifacts for configuration ':react-native-webview:classpath'.
> Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50.
Searched in the following locations:
- file:/nix/store/2vcnkyzsghmb5l139ndd0kcz2jsjdc5r-status-react-patched-npm-gradle-modules/.m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.50/kotlin-gradle-plugin-1.3.50.pom
- file:/nix/store/2vcnkyzsghmb5l139ndd0kcz2jsjdc5r-status-react-patched-npm-gradle-modules/.m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.50/kotlin-gradle-plugin-1.3.50.jar
Required by:
project :react-native-webview
mobile/js_files/DEPENDENCIES.md
Outdated
@@ -152,7 +152,7 @@ TODO: updating requires a pod update on iOS | |||
|
|||
used for touch-id identification | |||
|
|||
## "react-native-webview-bridge": "git+https://github.com/status-im/react-native-webview-bridge.git#fix/classnames-colision" | |||
## "react-native-webview": "git+https://github.com/status-im/react-native-webview.git#js_injection_before_load" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why #js_injection_before_load ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong, forgot to replace with a tag instead.
src/status_im/browser/core.cljs
Outdated
@@ -420,7 +420,10 @@ | |||
:browser/send-to-bridge | |||
(fn [{:keys [message webview]}] | |||
(when (and message webview) | |||
(.sendToBridge webview (types/clj->json message))))) | |||
(let [msg (str "ReactNativeWebView.onMessage('" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you elaborate ? looks weird
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a community-webview way of posting messages in RN->WebView direction. I used a modified version of what was suggested here.
We invoke onMessage
fn that is defined in provider.js
Looks good to me now. Dap.ps and simpledapp.eth are workoing now. Can send transaction in DApps. |
3aac91e
to
fbe8fd9
Compare
fbe8fd9
to
d0978f5
Compare
@Serhy thanks, rebased |
99% of end-end tests have passed
Failed tests (1)Click to expand
Passed tests (92)Click to expand |
That on test failed due to known bug which is in develop #10203 |
d0978f5
to
d4fd0d3
Compare
d4fd0d3
to
a4fedf5
Compare
a4fedf5
to
99f63b0
Compare
Signed-off-by: Vitaliy Vlasov <siphiuel@gmail.com>
99f63b0
to
85d0022
Compare
Fixes status-im/team-core#4