Tencent TBS x5 kernel only supports Android platform; iOS can only use its own WKWebview/UIWebview
The "Tencent TBS x5 kernel" in the following instructions is shortened to "x5 kernel".
Integrated x5 core description:
First, you need to upgrade to HBuilderX 2.5.3 or higher
Configure the manifest.json of the project according to the following instructions, and then submit the cloud package or use Custom Dock to take effect
Which pages will be rendered by the x5 core after integrating the x5 core?
It will take effect after submitting the cloud package using the X5 kernel module. Please use the [custom base] when running and debugging the real machine (http://ask.dcloud.net.cn/article/35115)
CPU type configuration does not support "x86", it is recommended to configure only "armeabi-v7a", otherwise the X5 kernel may not be used normally
HBuilderX 3.0.7+ version CPU type configuration starts to support "arm64-v8a"
For local offline packaging, please refer to: X5 Webview Configuration
For the uni applet SDK, please refer to: unimp applet integration x5 tutorial
The x5 is adapted to the custom theme font of rom, which is consistent with the native font. There will not be a problem that some fonts of the interface are native fonts and some fonts are webview fonts. Previously, the system webview could not adapt to the font of the rom custom theme on some mobile phones. (Note: Some devices may require a system reboot or do not support custom theme fonts)
The system webview has browser compatibility issues, and the low-end Android webview has many new syntaxes that are not supported. Using x5 you can snap the webview kernel. For 5+App and wap2app, all can be flushed. For uni-app, since uni-app comes with its own js engine, there is no browser compatibility problem at the js and component level itself, only the css of the vue page involves browser compatibility issues. If you want to use new css syntax such as sticky, you can use x5 lashing at this time. If the developer pays more attention and does not use too new syntax, in fact, x5 is useless in this regard at this time
The video implementation of the x5 kernel is stronger than the html video, and supports more video formats. (This can only be used for the built-in video in the html of 5+app and wap2app, and the video in the web-view component of uni-app. The default video component of uni-app itself is native and has nothing to do with x5)
Anti-hijacking of remote web pages is a highlight of the x5 kernel
# How to verify whether x5 and x5 version number are used
For HBuilderX 3.4.14+, use uni.getSystemInfo to see the returned browserName and browserVersion
Lower versions of HBuilderX use plus.navigator.getUserAgent()
Since x5 uses dynamic hot update to load x5 kernel. Review on Google Play is not allowed, so can't submit to Google Play
x5 does not support running on PC emulators, everything is based on real machines
The x5 kernel is not friendly to webview nesting support. Try not to use webview nesting (parent-child pages, etc.) for pages rendered by x5, which are prone to animation stuck and other phenomena
Due to the problem of the x5 loading kernel mechanism, the first time the cloud packaged APK is installed and run, the x5 may not be downloaded. At this time, the page is not rendered by the x5 kernel, but the system webview renders the page. But after the x5 download is complete, kill the process and run it again, the page will be rendered using the x5 kernel
Not all mobile phones have the x5 kernel. When the mobile phone does not have the x5 kernel, the app will download the kernel first after the app is started. Before the x5 is loaded successfully, the system webview is still used to call the webview.
html5 embedded iframe video fixed positioning will cause the application to crash
Some systems (Huawei) will not restart the system after modifying the font. As a result, the x5 page cannot immediately replace the font library and re-render. You need to kill the process and restart the application (back exiting the application is invalid) to reset the font library for page rendering
The APK itself has integrated X5 to be able to upgrade through wgt. If the apk itself does not integrate X5, it cannot support X5 through WGT upgrade. Need to change to APK upgrade!
You can use plus.navigator.getUserAgent to determine whether the UA contains the MQQBrowser keyword to determine whether the current webview is rendered by X5. HX2.6.16+ support
The scroll bar of the x5 kernel renders the page. A scrolling slider is displayed with the length of the page content. You can hold down the scroll slider and drag for fast scrolling. There is a difference with the normal webview scroll bar
The x5 kernel has a self-update mechanism. Therefore, there may be compatibility issues caused by the historical version upgrading the x5 kernel. Integrated students need to pay attention!
It is currently known that after the TBS45738 version is updated, the input component adjust-position=false of the uniapp vue page will become invalid! Students who use the x5 kernel, please know to adapt as soon as possible, you can change to nvue or not apply the x5 kernel.
# Summary of x5 browser kernel loading failure problems
Friday and Saturday (18:00-21:00) server maintenance does not support download
Does not support X86 devices
Frequent download of the IP of the x5 browser kernel will be limited to download
Non-wifi environment needs to configure allowDownloadWithoutWiFi to true to enable download
In the offline package debug environment, the download may fail
# Download X5 browser kernel in non-WiFi situation