-
Notifications
You must be signed in to change notification settings - Fork 186
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
使用RN的WebView报错(iOS)看这里 #50
Comments
fixed删除了?那是不需要手动替换WebView.ios.js文件了么? |
更新sdk就可以了,不需要手动替换 |
测试了一下最新的 sdk 还是不行。报错:Warning: Failed prop type: WebView: prop type babelHelpers.createClass(t, [
{
key: 'render',
value: function() {
var e = this;
if (this.props.onScrollChange) {
var r = this.props.nativeConfig || {},
o = r.props || {};
(o.onScrollChange = function(t) {
e.props.onScrollChange(t);
}),
(r.props = o),
(this.props.nativeConfig = r);
}
return babelHelpers
.get(
t.prototype.__proto__ || Object.getPrototypeOf(t.prototype),
'render',
this
)
.call(this);
},
},
]) |
@halloaw 看看你怎么用的 |
直接用 com.xiaomi.demo 测试,进入 WebViewBridageDemo 页面就会报错。 |
@halloaw 我刚才试过了,没有问题可以使用。 |
真机实在不行,又测试了一下。包括 5s,7。系统为 iOS 12。 |
@halloaw 十分抱歉,我之前是在我们自己的workplace下测试的。 |
请问现在这个问题修复了吗?我用最新的SDK,IOS下Webview组件还是报这个错。 |
这个问题解决了吗? 今天遇到了这个问题 - - webview不能使用 提示 onScrollChange啥的 |
我用的10005的sdk ,还是报这个错误 |
fixed是404啊
…------------------ 原始邮件 ------------------
发件人: "小米-刘梦舟"<notifications@github.com>;
发送时间: 2019年5月30日(星期四) 下午3:49
收件人: "MiEcosystem/miot-plugin-sdk"<miot-plugin-sdk@noreply.github.com>;
抄送: "云想衣裳花想容"<1395455317@qq.com>;"Comment"<comment@noreply.github.com>;
主题: Re: [MiEcosystem/miot-plugin-sdk] 使用RN的WebView报错(iOS)看这里 (#50)
Reopened #50.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@zhuxinleibandou @hc520messi
我这边用此仓库测试,在 |
------------------ 原始邮件 ------------------
发件人: "小米-刘梦舟"<notifications@github.com>;
发送时间: 2019年5月30日(星期四) 下午4:00
收件人: "MiEcosystem/miot-plugin-sdk"<miot-plugin-sdk@noreply.github.com>;
抄送: "云想衣裳花想容"<1395455317@qq.com>;"Mention"<mention@noreply.github.com>;
主题: Re: [MiEcosystem/miot-plugin-sdk] 使用RN的WebView报错(iOS)看这里 (#50)
@zhuxinleibandou @hc520messi
你们是第一次使用webView吗?还是说之前没问题,现在有问题?
你们仔细检查一下
/miot-plugin-sdk/bin/fixbug 文件夹下是否有WebView.ios这个文件?
npm start 进入插件时,终端是否有这两条log
warning: the transform cache was reset. transform[stdout]: FIXBUG node_modules/react-native/Libraries/Components/WebView/WebView.ios.js
我这边用此仓库测试,在SDK_10005和SDK_10020分支下,进入 demo WebView 页面没问题。
com.xiaomi.demo->「第三方库能力」-「webview和react-native双向通信」
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
我这边用此仓库测试,在SDK_10005和SDK_10020分支下,进入 demo WebView 页面没问题。
com.xiaomi.demo->「第三方库能力」-「webview和react-native双向通信」
这个我也有问题,也是报这个错误,
…------------------ 原始邮件 ------------------
发件人: "小米-刘梦舟"<notifications@github.com>;
发送时间: 2019年5月30日(星期四) 下午4:00
收件人: "MiEcosystem/miot-plugin-sdk"<miot-plugin-sdk@noreply.github.com>;
抄送: "云想衣裳花想容"<1395455317@qq.com>;"Mention"<mention@noreply.github.com>;
主题: Re: [MiEcosystem/miot-plugin-sdk] 使用RN的WebView报错(iOS)看这里 (#50)
@zhuxinleibandou @hc520messi
你们是第一次使用webView吗?还是说之前没问题,现在有问题?
你们仔细检查一下
/miot-plugin-sdk/bin/fixbug 文件夹下是否有WebView.ios这个文件?
npm start 进入插件时,终端是否有这两条log
warning: the transform cache was reset. transform[stdout]: FIXBUG node_modules/react-native/Libraries/Components/WebView/WebView.ios.js
我这边用此仓库测试,在SDK_10005和SDK_10020分支下,进入 demo WebView 页面没问题。
com.xiaomi.demo->「第三方库能力」-「webview和react-native双向通信」
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
之前说的这两条是否都已经满足?上面有截图的 |
1文件有,
2终端不输出这两条log
…------------------ 原始邮件 ------------------
发件人: "zanetti4"<notifications@github.com>;
发送时间: 2019年6月4日(星期二) 下午4:47
收件人: "MiEcosystem/miot-plugin-sdk"<miot-plugin-sdk@noreply.github.com>;
抄送: "云想衣裳花想容"<1395455317@qq.com>; "Mention"<mention@noreply.github.com>;
主题: Re: [MiEcosystem/miot-plugin-sdk] 使用RN的WebView报错(iOS)看这里 (#50)
/miot-plugin-sdk/bin/fixbug 文件夹下是否有WebView.ios这个文件?
2.npm start 进入插件时,终端是否有这两条log
warning: the transform cache was reset.
transform[stdout]: FIXBUG node_modules/react-native/Libraries/Components/WebView/WebView.ios.js
之前说的这两条是否都已经满足?上面有截图的
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
fixed被删除了,换个解决办法可以嘛? 或者恢复一下fixed,上传也是发给我 这个链接
…------------------ 原始邮件 ------------------
发件人: "米家-iOS-张文锋"<notifications@github.com>;
发送时间: 2019年6月17日(星期一) 中午11:31
收件人: "MiEcosystem/miot-plugin-sdk"<miot-plugin-sdk@noreply.github.com>;
抄送: "云想衣裳花想容"<1395455317@qq.com>; "Mention"<mention@noreply.github.com>;
主题: Re: [MiEcosystem/miot-plugin-sdk] 使用RN的WebView报错(iOS)看这里 (#50)
Closed #50.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
原因
iOS native 端修改了
WebView
,增加了新的属性onScrollChange
。解决办法
下载fixed中的
WebView.ios.js
,替换本地项目路径下的node_modules/react-native/Libraries/Components/WebView/WebView.ios.js
。The text was updated successfully, but these errors were encountered: