---
title: "extendLaunchMeasurement(forTaskID:)"
framework: metrickit
role: symbol
role_heading: Type Method
path: "metrickit/mxmetricmanager/extendlaunchmeasurement(fortaskid:)"
---

# extendLaunchMeasurement(forTaskID:)

Starts to measure an extended launch task with the given task identifier.

## Declaration

```swift
class func extendLaunchMeasurement(forTaskID taskID: MXLaunchTaskID) throws
```

## Parameters

- `taskID`: The task identifier. Must be a unique, non-null string.

## Discussion

Discussion Use this method on the main thread to measure an extended launch task. Your app needs to start the first task before or during scene(_:restoreInteractionStateWith:), or before the system calls sceneDidBecomeActive(_:) on the first scene to connect, and each task needs to overlap with others. The maximum number of tasks is 16. The extended launch measurement finishes when all running tasks finish.

## See Also

### Measuring an extended launch

- [finishExtendedLaunchMeasurement(forTaskID:)](metrickit/mxmetricmanager/finishextendedlaunchmeasurement(fortaskid:).md)
- [MXLaunchTaskID](metrickit/mxlaunchtaskid.md)
