---
title: "next(isolation:)"
framework: Managed App Distribution
role: symbol
role_heading: Instance Method
platforms: [Mac Catalyst 26.4+, macOS 26.4+]
path: "managedappdistribution/managedpackagelibrary/managedpackages/asynciterator/next(isolation:)"
---

# next(isolation:)

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

## Declaration

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