IBM Aspera JavaScript Library
    Preparing search index...

    Function init

    • Initialize the SDK and connect to a transfer client. Returns a promise that resolves when the transfer client is ready, or rejects if it cannot be reached.

      By default, the SDK connects to IBM Aspera for desktop. Set connectSettings.useConnect to use IBM Aspera Connect instead. If httpGatewaySettings is provided, the gateway is set up first — when forceGateway is true it becomes the sole transport; when false it is set up as a supplementary transport and the primary client (Desktop or Connect) is still initialized afterward.

      Note that the promise behavior varies by transfer client. For Desktop, the promise remains pending until the application is detected. For Connect, the promise resolves immediately after initialization begins — use registerStatusCallback to track when Connect is actually ready. For a non-blocking alternative that provides consistent lifecycle status events across all transfer clients, see initSession.

      Parameters

      Returns Promise<any>

      a promise that resolves with SDK metadata when the transfer client is ready

      init({ appId: 'my-app' })
      .then(() => {
      // Transfer client is ready — enable UI
      })
      .catch(error => {
      // Could not connect — prompt user to install or launch
      });