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
}
Post
Replies
Boosts
Views
Activity
@Jason, Thank you for your answer. But i didn't download any file. Actually, my extension doesn't receive task callbacks after app install. I got these errors from console.app when I debug the Background Asset from the command line. And what should i do now? (And if I add a comment directly, it doesn't show?)