<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: 26.4.0 -",
    "macOS: 26.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ManagedAppDistribution",
  "identifier" : "/documentation/ManagedAppDistribution/ManagedPackageLibrary/ManagedPackages/AsyncIterator/next(isolation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ManagedAppDistribution"
    ],
    "preciseIdentifier" : "s:22ManagedAppDistribution0A14PackageLibraryC0A8PackagesV13AsyncIteratorV4next9isolations6ResultOySayAA0aD0VGAA0abC5ErrorOGSgScA_pSgYi_tYaF"
  },
  "title" : "next(isolation:)"
}
-->

# next(isolation:)

Asynchronously advances to the next element and returns it, or ends the sequence if there is no next element.

```
func next(isolation actor: isolated (any Actor)?) async throws(ManagedPackageLibrary.ManagedPackages.AsyncIterator.Failure) -> ManagedPackageLibrary.ManagedPackages.AsyncIterator.Element?
```

---

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)