Generate code

更新时间:
复制 MD 格式

Mobile Gateway lets you generate client software development kits (SDKs) for APIs.

About this task

Only HTTP APIs support code generation for a single API.

Procedure

  1. Open the Client Code Generation window in one of the following ways:

    • On the API Groups tab, click Generate Code in the Actions column.

    • On the API Management tab, click the Generate Code button above the list.

    • On the API Management tab, click More > Generate Code in the Actions column. This method generates code for a single API instead of an API group and is only available for HTTP APIs.

  2. In the Client Code Generation window, configure the following parameters:

    • API Group: Select the API group for which to generate an SDK.

    • Platform: Select Android, iOS, or JS:

      • If you select Android, enter a package name for the client code in the PackageName field. If you leave this field blank, the default value is com.client.service.

      • If you select iOS, enter a unique prefix in the Prefix field. If you leave this field blank, no prefix is added.

  3. Click Submit to generate the API SDK.