For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/guide/start/integrate-lynx-dev-version.md.
Lynx
  • English
  • Integrate Lynx development version

    During Lynx page development, you can use the Trace and Lynx Recorder tools for debugging, analysis, and locate issues. To avoid impacting production performance, the official release version of Lynx does not include Trace and Recorder features. For developer convenience, Lynx also provides a development version (with a -dev suffix in the version number). Starting from release/3.4, Lynx provides a dev version for each release version (the dev version uses the same release version number with a -dev suffix). You can integrate the Lynx development version by following the steps below.

    Info

    You can find the development version corresponding to your release version at github.

    Integrate Lynx

    Refer to the Lynx integration guide for detailed steps on integrating Lynx.

    Integrate Lynx DevTool

    Refer to the Lynx DevTool integration guide for detailed steps on integrating Lynx DevTool.

    Switch to the dev version of Lynx

    Update the Lynx, LynxDevtool, and LynxService declarations in your Podfile to use the matching dev version. Make sure the Podfile declares the lynx-family Specs repository as a source, as shown in the Lynx integration guide.

    Podfile
    pod 'Lynx', '4.2.0'
    pod 'Lynx', '4.2.0-dev'
    
    pod 'LynxDevtool', '4.2.0'
    pod 'LynxDevtool', '4.2.0-dev'
    
    pod 'LynxService', '4.2.0', :subspecs => ['Devtool'] 
    pod 'LynxService', '4.2.0-dev', :subspecs => ['Devtool'] 

    The example shows the Devtool subspec required by the DevTool integration guide. Preserve all previously selected subspecs, including Image, Log, and Http, under the same LynxService version. If your app also uses XElement, switch its declaration to the matching dev version and preserve its selected subspecs. Keep PrimJS and third-party dependencies at their independently required versions.

    Install Dependencies

    Run pod install to install dependencies, then open your Xcode project and rebuild.

    Integrate Lynx

    Refer to the Lynx integration guide for detailed steps on integrating Lynx.

    Integrate Lynx DevTool

    Refer to the Lynx DevTool integration guide for detailed steps on integrating Lynx DevTool.

    Switch to the dev version of lynx and lynx-trace

    Update your build.gradle or build.gradle.kts to use the dev versions:

    Note

    Keep the version of lynx-jssdk unchanged. It has no -dev variant.

    build.gradle
    build.gradle.kts
    implementation ("org.lynxsdk.lynx:lynx:4.2.0") 
    implementation ("org.lynxsdk.lynx:lynx:4.2.0-dev") { 
      // Exclude the lynx-trace module to avoid including it transitively
      exclude group: 'org.lynxsdk.lynx', module: 'lynx-trace'
    } 
    
    implementation ("org.lynxsdk.lynx:lynx-trace:4.2.0") 
    implementation ("org.lynxsdk.lynx:lynx-trace:4.2.0-dev") 
    
    implementation ("org.lynxsdk.lynx:lynx-devtool:4.2.0") 
    implementation ("org.lynxsdk.lynx:lynx-devtool:4.2.0") { 
      // Exclude the lynx-trace and lynx module to avoid including it transitively
      exclude group: 'org.lynxsdk.lynx', module: 'lynx-trace'
      exclude group: 'org.lynxsdk.lynx', module: 'lynx'
    } 

    Rebuild your application

    Rebuild your application to ensure all changes take effect.

    Integrate Lynx

    Refer to the Lynx integration guide for detailed steps on integrating Lynx.

    Integrate Lynx DevTool

    Refer to the Lynx DevTool integration guide for detailed steps on integrating Lynx DevTool.

    Switch to the dev version of lynx and lynx_devtool

    Warning

    Harmony dev packages may still be under review on OHPM after the corresponding release packages become available. Before switching, check that the dev version shown below is available for both @lynx/lynx and @lynx/lynx_devtool.

    If either package is missing, wait for both packages to become available or use an earlier release for which both dev packages are available. If you use an earlier release, align your other Lynx dependencies and root overrides with that release before switching.

    Update your oh-package.json5 to use the dev versions of Lynx and Lynx DevTool.

    "dependencies": {
      "@lynx/lynx": "4.2.0",
      "@lynx/lynx_devtool": "4.2.0",
      "@lynx/lynx": "4.2.0-dev",
      "@lynx/lynx_devtool": "4.2.0-dev",
    }

    Install Dependencies

    Run ohpm install to install dependencies, then open your DevEco-Studio project and rebuild.

    Congratulations! You have completed the integration of the Lynx development version. Now, you can launch the DevTool desktop application and start debugging and performance profiling using either the LynxTrace or LynxRecorder tool.

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.