MobileFirst 6.3网络调试问题问题、网络、MobileFirst

2023-09-08 08:43:01 作者:酒取

我使用MobileFirst 6.3的应用程序,建立一个Android版本,并试图监控XHR查询Chrome浏览器开发工具网络上时,查询没有显示,

I am using MobileFirst 6.3 for an application, when building an Android version and trying to monitor XHR Query on Chrome Dev Tool network, queries are not showing,

我以前看到他们previous工作灯的版本。

I used to see them with previous worklight versions.

我看到有在6.3版本+一个新的插件WLNativeXHRPlugin,这是否与我的问题?

I saw that there is a new plugin WLNativeXHRPlugin in 6.3 + versions, is it related to my issue?

任何帮助吗?

推荐答案

在XHR请求已经从JavaScript的层到原生层感动,这就是为什么你没有看到他们在Chrome开发工具的网络选项卡

The XHR requests have been moved from the JavaScript layer to the native layer, and this is why you do not see them in the Network tab in the Chrome dev tools.

您可以把他们带回来,但你一定不要忘记当你去到生产,从应用程序中删除此code。这也是不支持并可以打破/停止在任何时刻工作,这可能发生在你的应用程序将不支持任何效果。

You can bring them back, but you must then not forget to remove this code from the app when you go to production. It is also not supported and can break/stop working at any moment, any effect that may happen to your app will not be supported.

添加以下底部的common \\ JS \\ initOptions.js:

Add the following to the bottom in common\js\initOptions.js:

WL.androidProfileData[WL.EPField.SUPPORT_WL_NATIVE_XHR] = false;
WL.iphoneProfileData[WL.EPField.SUPPORT_WL_NATIVE_XHR] = false;
WL.ipadProfileData[WL.EPField.SUPPORT_WL_NATIVE_XHR] = false;
WL.windowsphone8ProfileData[WL.EPField.SUPPORT_WL_NATIVE_XHR] = false;

然后应该工作。