The following code
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// create window
MXMetricManager.shared.add(self)
do {
try MXMetricManager.extendLaunchMeasurement(forTaskID: MXLaunchTaskID("1234.zmmm"))
print("some task perform")
try MXMetricManager.finishExtendedLaunchMeasurement(forTaskID: MXLaunchTaskID("1234.zmmm"))
} catch {
print(error)
}
return true
}
Topic:
Developer Tools & Services
SubTopic:
General
Tags: