---
title: "finalizeLicenseResponse(licenseResponse:signature:)"
framework: applicensedeliverysdk
role: symbol
role_heading: Instance Method
path: "applicensedeliverysdk/aldsession/finalizelicenseresponse(licenseresponse:signature:)"
---

# finalizeLicenseResponse(licenseResponse:signature:)

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

## Declaration

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

## Parameters

- `licenseResponse`: The license created by doc://com.apple.AppLicenseDeliverySDK/documentation/AppLicenseDeliverySDK/ALDSession/generateLicenseResponse().
- `signature`: A signature for the license, signed by the signing certificate private key.

## Mentioned in

Licensing alternative distribution apps

## Return Value

Return Value The signed license in a byte array.

## Discussion

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 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.
