magicismight / react-native-advanced-webview Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
PropTypes is a standalone module now, so first two lines of WebView.ios.js need to be changed into:
import React, { cloneElement } from 'react';
import PropTypes from 'prop-types';
/react-native-advanced-webview/ios/RNAdvancedWebView.h:1:9: fatal error: 'React/RCTWebView.h' file not found
#import <React/RCTWebView.h>
Hi. I started using this plugin just to hide the form bar above the keyboard in my app’s webview, but now I get an NSPOSIXErrorDomain error every time I install the app on a device, but the weird part is it only happens when the app is installed from Test Flight. The error does not appear when building it and running it on a device via Xcode.
This has never happened when using React Native’s built-in WebView.
I am using the allowFileAccessFromFileURLs prop.
<WebView
style={styles.webView}
ref={(ref) => { this.webView = ref; }}
scrollEnabled={false}
javaScriptEnabled
javaScriptEnabledAndroid
hideAccessory
allowFileAccessFromFileURLs
source={require('./index.html')}
onLoad={this.sendDataToWebview}
onMessage={event => this.handleOnMessage(event.nativeEvent.data)}
onNavigationStateChange={(event) => {
// https://stackoverflow.com/a/40382325
if (event.navigationType && event.navigationType === 'click') {
this.webView.stopLoading();
Linking.openURL(event.url);
}
}}
/>
uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [editor:react-native-advanced-webview:unspecified] /Users/afei/Codes/test/editor/android/app/build/intermediates/exploded-aar/editor/react-native-advanced-webview/unspecified/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="im.shimo.react.webview" to force usage
I get this error and it seems to be when the webview
is unmounting.
Attempt to write to field 'java.util.ArrayList im.shimo.react.webview.AdvancedWebViewManager$AdvancedWebViewClient.mPendingMessages' on a null object reference
onDropViewInstance
AdvancedWebViewManager.java:463
onDropViewInstance
AdvancedWebViewManager.java:48
dropView
NativeViewHierarchyManager.java:573
dropView
NativeViewHierarchyManager.java:584
dropView
NativeViewHierarchyManager.java:584
dropView
NativeViewHierarchyManager.java:584
dropView
NativeViewHierarchyManager.java:584
dropView
NativeViewHierarchyManager.java:584
manageChildren
NativeViewHierarchyManager.java:470
execute
UIViewOperationQueue.java:227
run
UIViewOperationQueue.java:894
flushPendingBatches
UIViewOperationQueue.java:1001
access$2400
UIViewOperationQueue.java:46
doFrameGuarded
UIViewOperationQueue.java:1061
doFrame
GuardedFrameCallback.java:29
doFrame
ReactChoreographer.java:134
doFrame
ChoreographerCompat.java:105
run
Choreographer.java:947
doCallbacks
Choreographer.java:761
doFrame
Choreographer.java:693
run
Choreographer.java:935
handleCallback
Handler.java:873
dispatchMessage
Handler.java:99
loop
Looper.java:193
main
ActivityThread.java:6669
invoke
Method.java
run
RuntimeInit.java:493
main
ZygoteInit.java:858
The React Native Repo has an issue open here. Any advice would be greatly appreciated, especially if anyone has seen this before.
Using:
React Native: 0.57.7
React: 16.6.3
android {
compileSdkVersion 26
buildToolsVersion '27.0.3'
defaultConfig {
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName version
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.