<!--
{
  "availability" : [

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

# generateLicense(attr:)

Generates a license based on the provided ALDLicenseAttribute and add it to the session.
Multiple licenses can be generated in this session by callling this function multiple times, they get added to the session response.

```
func generateLicense(attr: ALDLicenseAttribute) throws
```

## Parameters

`attr`

And ALDLicenseAttribute describing the terms of the license and the key objects

---

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)