---
title: "getUserTraveled(completionHandler:)"
framework: exposurenotification
role: symbol
role_heading: Instance Method
path: "exposurenotification/enmanager/getusertraveled(completionhandler:)"
---

# getUserTraveled(completionHandler:)

Obtains information about the user’s travel within an exposure period.

## Declaration

```swift
func getUserTraveled(completionHandler: @escaping @Sendable (Bool, (any Error)?) -> Void)
```

```swift
func userTraveled() async throws -> Bool
```

## Parameters

- `completionHandler`: The completion handler that the framework calls when the method completes.

## Discussion

Discussion important: You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration: func userTraveled() async throws -> Bool For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously. important: This method is available in iOS 12.5, and in iOS 13.5 and later. Use this method to determine whether the user has traveled outside of the region associated with your app anytime in the last 14 days. You might use this information to determine when to share keys across regions. The first time you use this method, the user will be asked for permission. The app must be in the foreground the first time this is called so that the app may ask the user for permission.

## See Also

### Obtaining Exposure Information

- [detectExposures(configuration:diagnosisKeyURLs:completionHandler:)](exposurenotification/enmanager/detectexposures(configuration:diagnosiskeyurls:completionhandler:).md)
- [detectExposures(configuration:completionHandler:)](exposurenotification/enmanager/detectexposures(configuration:completionhandler:).md)
- [getExposureWindows(summary:completionHandler:)](exposurenotification/enmanager/getexposurewindows(summary:completionhandler:).md)
- [ENGetExposureWindowsHandler](exposurenotification/engetexposurewindowshandler.md)
- [ENGetUserTraveledHandler](exposurenotification/engetusertraveledhandler.md)
- [getExposureInfo(summary:userExplanation:completionHandler:)](exposurenotification/enmanager/getexposureinfo(summary:userexplanation:completionhandler:).md)
