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/api/lynx-native-api/template-bundle/from-template.md.
Lynx
  • English
  • fromTemplate

    Input Lynx template binary content and return the parsed TemplateBundle object.

    Syntax

    Android

    public static TemplateBundle fromTemplate(byte[] template);

    Parameters

    • template: Template binary content.

    Return

    • The TemplateBundle object.
    Note
    • When the input template is null, this method returns null directly.
    • When the input template is not a correct Lynx template data, an invalid TemplateBundle is returned.

    iOS

    - (instancetype _Nullable)initWithTemplate:(nonnull NSData *)tem;

    Parameters

    • tem: Template binary content.

    Return

    • The TemplateBundle object.
    Note
    • When the input tem is not a correct Lynx template data, or is nil, an invalid TemplateBundle is returned

    Harmony

    public static async fromTemplate(template: ArrayBuffer): Promise<TemplateBundle>;

    Parameters

    • template: Template binary content.

    Return

    • TemplateBundle in promise.

    Compatibility

    LCD tables only load in the browser

    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.