<!--
{
  "availability" : [
    "iOS: 16.0.0 - 27.2.0",
    "iPadOS: 16.0.0 - 27.2.0",
    "macCatalyst: 16.0.0 - 27.0.0",
    "macOS: 13.0.0 - 27.2.0",
    "visionOS: 1.0.0 - 27.2.0"
  ],
  "documentType" : "symbol",
  "framework" : "MetricKit",
  "identifier" : "/documentation/MetricKit/MXMetricManager/extendLaunchMeasurement(forTaskID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "MetricKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MXMetricManager(cm)extendLaunchMeasurementForTaskID:error:"
  },
  "title" : "extendLaunchMeasurement(forTaskID:)"
}
-->

# extendLaunchMeasurement(forTaskID:)

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

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

## Parameters

`taskID`

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

## 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 <doc://com.apple.documentation/documentation/UIKit/UISceneDelegate/scene(_:restoreInteractionStateWith:)>, or before the system calls <doc://com.apple.documentation/documentation/UIKit/UISceneDelegate/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.

---

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)