<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ARKit",
  "identifier" : "/documentation/ARKit/ARKitSession/run(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ARKit"
    ],
    "preciseIdentifier" : "s:5ARKit0A7SessionC3runyySayAA12DataProvider_pGYaKF"
  },
  "title" : "run(_:)"
}
-->

# run(_:)

Runs a session with the data providers you supply.

```
final func run(_ dataProviders: [any DataProvider]) async throws
```

## Parameters

`dataProviders`

The providers that supply data during this session.

## Discussion

If you call this method without previously calling the [`requestAuthorization(for:)`](/documentation/ARKit/ARKitSession/requestAuthorization(for:)) method, and if any of the data providers you supply require authorization, the system prompts the user for authorization when you call [`run(_:)`](/documentation/ARKit/ARKitSession/run(_:)). If you call this method on an already-running session, ARKit stops the previous providers unless they’re also in the new array of providers.

This method either throws an [`ARKitSession.Error`](/documentation/ARKit/ARKitSession/Error) or asserts when there’s a problem with the data providers you supply. Potential problems include:

- Passing a data provider that’s already in use in another session
- Passing a data provider that’s stopped
- Passing a data provider that’s not supported in the current context, such as in Simulator

When this method throws an error, its session stops all of the associated data providers.

---

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)