# Configure an ARCore session in iOS

Configure an ARCore session to build AR experiences for your app.

## What is a session?

All [AR processes](https://developers.google.com/ar/discover/concepts), such as motion tracking,
environmental understanding, and lighting estimation, happen inside an ARCore
session. [`GARSession`](https://developers.google.com/ar/reference/ios/interface_g_a_r_session) is the main entry point to the ARCore
API. It manages the AR system state and handles the session lifecycle, allowing
the app to create, configure, start, or stop a session. Most importantly, it
enables the app to receive frames that allow access to the camera image and
device pose.

The session can be used to configure the following features:

- [Cloud Anchors](https://developers.google.com/ar/develop/cloud-anchors)
- [Augmented Faces](https://developers.google.com/ar/develop/augmented-faces)
- [ARCore Geospatial API](https://developers.google.com/ar/develop/geospatial)

## Configure a session

To use either the [Cloud Anchors](https://developers.google.com/ar/develop/cloud-anchors) API or the
[Geospatial](https://developers.google.com/ar/develop/geospatial) API, you have to create a
[GARSessionConfiguration](https://developers.google.com/ar/reference/ios/interface_g_a_r_session_configuration)
with either the `cloudAnchorMode` or `geospatialMode` property:

- create a
  [`GARSessionConfiguration`](https://developers.google.com/ar/reference/ios/interface_g_a_r_session_configuration)
  and set the `geospatialMode` or `cloudAnchorMode` property for it.

- Use
  [`setConfiguration:error: (GARSession)`](https://developers.google.com/ar/reference/ios/interface_g_a_r_session#aa30bf763b9b1006371f6c93294bd76f5)
  to set the configuration.

## Create a session in iOS

- Create a [`GARSession`](https://developers.google.com/ar/reference/ios/interface_g_a_r_session).
- Set a [`GARSessionDelegate`](https://developers.google.com/ar/reference/ios/protocol_g_a_r_session_delegate-p) to get callbacks from hosting and resolving operations.
- Create and run an [`ARSession`](https://developer.apple.com/documentation/arkit/arsession).
- Set an [`ARSessionDelegate`](https://developer.apple.com/documentation/arkit/arsession/2865614-delegate).
- Pass [`ARFrame`s](https://developer.apple.com/documentation/arkit/arframe) to the `GARSession` in the `session:didUpdateFrame:` method.

## Next steps

- [Cloud Anchors for iOS](https://developers.google.com/ar/develop/ios/cloud-anchors/overview)
- [Augmented Faces for iOS](https://developers.google.com/ar/develop/ios/augmented-faces/overview)
- [ARCore Geospatial API](https://developers.google.com/ar/develop/geospatial)