<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "applicensedeliverysdk",
  "identifier" : "/documentation/AppLicenseDeliverySDK/ALDSession/finalizeLicenseResponse(licenseResponse:signature:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "App License Delivery SDK"
    ],
    "preciseIdentifier" : "s:3ALD10ALDSessionC23finalizeLicenseResponse07licenseE09signatureSays5UInt8VGAI_AISgtKF"
  },
  "title" : "finalizeLicenseResponse(licenseResponse:signature:)"
}
-->

# finalizeLicenseResponse(licenseResponse:signature:)

Returns a signed license in a byte array to send in response to a license request from iOS.

```
func finalizeLicenseResponse(licenseResponse: [UInt8], signature: [UInt8]? = nil) throws -> [UInt8]
```

## Parameters

`licenseResponse`

The license created by [`generateLicenseResponse()`](/documentation/AppLicenseDeliverySDK/ALDSession/generateLicenseResponse()).

`signature`

A signature for the license, signed by the signing certificate private key.

## Return Value

The signed license in a byte array.

## Discussion

Encode the return result to `base64` and send it as the `"license"` key in response to an iOS license request.

You can omit the `signature` argument if you include the `signingKey` argument in the [`ALDProvider`](/documentation/AppLicenseDeliverySDK/ALDProvider) initializer. Otherwise, pass in a signature of the license in the `signature` argument, signed by the signing certificate private key.

For more information, see [Licensing alternative distribution apps](/documentation/applicensedeliverysdk/licensing-alternative-distribution-apps).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)