Hi everyone,
I’m working with the App Store Connect API to analyze my app's launch time performance, but I’d like to retrieve historical data spanning multiple dates. However, I haven’t found parameters like startDate or endDate in the API documentation.
Is there any way to retrieve data for past dates, or is the API limited to recent data only? If anyone has experience with this or any workaround, I’d love to hear about it.
Thank you!
MetricKit
RSS for tagAggregate and analyze per-device reports on power and performance metrics using MetricKit.
Posts under MetricKit tag
13 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hi Folks,
I'm currently using the App Store Connect API's perfPowerMetrics endpoint to pull launch time metrics for my app, but I want to break down the data by specific iPhone models (e.g., iPhone 13 Pro, iPhone 12, etc.). I’ve tried using filter[deviceType] set to all_iphones, which works, but it aggregates data for all iPhone models.
Does anyone know the specific identifiers for individual iPhone models, or if there's a way to retrieve metrics by specific iPhone model segments?
TIA
I'm a big fan of MetricKit. I decided to see how my apps are performing with iOS 18 and well, I'm not getting any metric payloads from those devices. Metric payloads received from my test devices adopting iOS 18 has pretty much bottomed out to zero.
Is anyone getting MetricKit MXMetricPayloads from iOS 18 devices?
FB15461298 - MetricKit: Production issue / regression with iOS 18 - Significant dropout or metric payloads being generated since 18.0 - nearly no reports
To demonstrate the issue, I decided to graph the metric payloads my infrastructure receives for all of my apps across all of my devices over the last 16 months starting with WWDC23 timeframe. This data is grouped by count per month. A trend can easily be seen starting in June 2024 where I started to adopt iOS 18 betas.
Zooming in since WWDC24, grouped by week, it is much easier to see the decline.
Note, the second screenshot shows data collected from Xcode builds, TestFlight, and App Store. The last data point from today was a manual creation from Xcode's Debug window, so at least that triggering mechanism works and I can confirm all of my code to upload off device works as expected.
On the bright side, I guess I will ship this 'payload received over time' feature in my MetricKit payload analyzer app with a scrolling window and group by features that make up these screenshots.
https://developer.apple.com/documentation/metrickit
I am unable to get the MetricKit logs for past 24 hours time period on my test flight build. I have been able to achieve immediate logs for crash, cpu exception and diskwrite exceptions. But the logs which contains all the crashes, cpu exceptions and diskwrite exceptions, battery and network details, etc for the previous day/24h are never generated. I have used the following method to log the payloads in the file systems. I have tested the same on normal xcode builds as well as TestFlight build.
func didReceive(_ payloads: [MXDiagnosticPayload])
https://developer.apple.com/documentation/metrickit/mxmetricmanagersubscriber/didreceive(_:)-9yd4u
let metrics: [XCTMetric] = [XCTClockMetric(), // to measure time
XCTCPUMetric(), // to measure cpu cycles
XCTStorageMetric(), // to measure storage consuming
XCTMemoryMetric(),
]
let measureOptions = XCTMeasureOptions.default
measureOptions.iterationCount = 1
measure(metrics: metrics) {
//App flow
}
I want to get values of XCTCPUMetric, XCTMemoryMetric, XCTStorageMetric etc in any variable so that if want to send it further somewhere I can do it.
Example -
// let cpuMetric = CPU measure object should be here & I can get each information from this object.
// let MemoryMetric = Memory measure object should be here & I can get each information from this object.
But It's not available in XCUITest. We can only able to find it in the TestResult file. Please suggest any code available to get each metric object & value in the XCUITest rather than the test result.
`
let metrics: [XCTMetric] = [XCTClockMetric(), // to measure time
XCTCPUMetric(), // to measure cpu cycles
XCTStorageMetric(), // to measure storage consuming
XCTMemoryMetric(),
]
let measureOptions = XCTMeasureOptions.default
measureOptions.iterationCount = 1
measure(metrics: metrics) {
//App flow
}
`
I want to get values of XCTCPUMetric, XCTMemoryMetric, XCTStorageMetric etc in any variable so that if want to send it further somewhere I can do it.
Example -
// let cpuMetric = CPU measure object should be here & I can get each information from this object.
// let MemoryMetric = Memory measure object should be here & I can get each information from this object.
But It's not available in XCUITest. We can only able t find it in the TestResult file.
Please suggest any code available to get each metric object & value in the XCUITest rather than the test result.
I have integrated MetricKit into my production app and listening for the corresponding callback
func didReceive(_ payloads: [MXDiagnosticPayload])
After some time, I've noticed that the hang diagnostics data collected are all for hangs longer than 1 second.
Does MetricKit only collect hang data for hangs longer than 1 second?
Can this threshold be adjusted, for example, to 500ms?
Is there any sampling involved in the collection of hang diagnostics? The number of hang events collected by MetricKit is significantly lower compared to other third-party platforms.
Thank you for your response, this is very important to me.
No metrics data found for the latest app versions with sufficient usage.
What is sufficient usage ?
Can we define sufficient usage ourself ? if Yes then how ?
https://developer.apple.com/videos/play/wwdc2020/10076/
wwwdc200 does mention factor of 5, but 5 of what ? and when where is the definition ?
Organizer -> Metrics is useless if there is no data.
If someone knows the fix please suggest.
In statistical objects In MXMetricPayload histogrammedTimeToFirstDrawKey start times not equal applicationExitMetrics exit:
case1:
"applicationExitMetrics": {
"backgroundExitData": {
"cumulativeNormalAppExitCount": 3,
"cumulativeMemoryPressureExitCount": 4
},
"foregroundExitData": {
"cumulativeMemoryResourceLimitExitCount": 3
}
},
"applicationLaunchMetrics": {
"histogrammedTimeToFirstDrawKey": {
"histogramNumBuckets": 14,
"histogramValue": {
"10": {
"bucketCount": 1,
"bucketStart": "1740 ms",
"bucketEnd": "1749 ms"
},
"2": {
"bucketCount": 1,
"bucketStart": "1440 ms",
"bucketEnd": "1449 ms"
},
"3": {
"bucketCount": 2,
"bucketStart": "1490 ms",
"bucketEnd": "1499 ms"
},
"11": {
"bucketCount": 1,
"bucketStart": "1780 ms",
"bucketEnd": "1789 ms"
},
"4": {
"bucketCount": 1,
"bucketStart": "1500 ms",
"bucketEnd": "1509 ms"
},
"5": {
"bucketCount": 1,
"bucketStart": "1580 ms",
"bucketEnd": "1589 ms"
},
"12": {
"bucketCount": 1,
"bucketStart": "1860 ms",
"bucketEnd": "1869 ms"
},
"6": {
"bucketCount": 1,
"bucketStart": "1620 ms",
"bucketEnd": "1629 ms"
},
"13": {
"bucketCount": 1,
"bucketStart": "1990 ms",
"bucketEnd": "1999 ms"
},
"7": {
"bucketCount": 1,
"bucketStart": "1650 ms",
"bucketEnd": "1659 ms"
},
"0": {
"bucketCount": 1,
"bucketStart": "1400 ms",
"bucketEnd": "1409 ms"
},
"8": {
"bucketCount": 1,
"bucketStart": "1660 ms",
"bucketEnd": "1669 ms"
},
"1": {
"bucketCount": 1,
"bucketStart": "1430 ms",
"bucketEnd": "1439 ms"
},
"9": {
"bucketCount": 1,
"bucketStart": "1730 ms",
"bucketEnd": "1739 ms"
}
}
},
In this Case the app cold started 15 times, but quit only 10 times, why??
case2:
"applicationExitMetrics": {
"backgroundExitData": {
"cumulativeMemoryPressureExitCount": 1
},
"foregroundExitData": {
"cumulativeMemoryResourceLimitExitCount": 3,
"cumulativeNormalAppExitCount": 1
}
},
"applicationLaunchMetrics": {
"histogrammedTimeToFirstDrawKey": {
"histogramNumBuckets": 3,
"histogramValue": {
"0": {
"bucketCount": 1,
"bucketStart": "1490 ms",
"bucketEnd": "1499 ms"
},
"1": {
"bucketCount": 1,
"bucketStart": "1680 ms",
"bucketEnd": "1689 ms"
},
"2": {
"bucketCount": 1,
"bucketStart": "1880 ms",
"bucketEnd": "1889 ms"
}
}
},
The app cold started 3 times, but quit unexpectedly reached 5 times, why???
I've recently started working with IPS files, specifically crash reports. According to the documentation there are a number of metadata keys included in these payloads, however, I have found a number that are present in real ips files from device but are not documented.
Does anyone know what version of iOS these 'new' metadata keys were introduced? How about if they're expected or if I should treat them as optional.
https://developer.apple.com/documentation/xcode/interpreting-the-json-format-of-a-crash-report#IPS-metadata
{
"app_name":"ApplicationNameHere",
"timestamp":"2024-02-15 08:05:05.00 -0600",
"app_version":"1.6.0",
"slice_uuid":"6b1f9f4e-3025-364f-9847-914fc1fe14d1",
"build_version":"800",
"platform":2,
"bundleID":"reverse.domainname.bundleidentifier",
"share_with_app_devs":1,
"is_first_party":0,
"bug_type":"309",
"os_version":"iPhone OS 17.3.1 (21D61)",
"roots_installed":0,
"name":"ApplicationNameHere",
"incident_id":"1CF0B8A1-EB43-46B3-AA9F-CFA8A9259190"
}
The following keys are not in the documentation: app_name, os_version, slice_uuid, share_with_app_devs, is_first_party, roots_installed
I created this feedback to request the documentation be updated with current state.
FB13631161 - Developer Documentation: Update IPS metadata to reflect latest values found in IPS Metadata JSON
Hello, I am looking for a guide on what the HUD graph axis' are, with my main curiosity around the GPU metering. Is this number the load average of the cores, similar to the load avg you see in uptime/top or is it another descriptor? I've not been able to refer to a man page or the readme for this, google searches have yielded me many ways to disable the HUD, but no guide
The crash data opt in rate is 36% for my app. I have another crash reporting framework PLC in the app. The total number of crashes reported by MetricKit health report was 43% of the total crash count from PLC in May. This almost matched the 36% opt in rate.
In the month of June we fixed a series of crashes. Now the total number of crashes reported by MetricKit health report is 80% of the total crash count from PLC. The crash data opt in rate has stayed at 36% for the past 90 days and I am not able to understand how the ratio flipped from 43% to 80%. Looking for guidance here.
I am trying to implement MetricKit so later I could analyze MXCrashDiagnostic and MXHangDiagnostic reports. However when I am triggering a test crash, Here is an example of what I get for MXCrashDiagnostic:
iente "timeStampEnd": "2021-06-07 15:59:00 +0000", "crashDiagnostics": [ { "version": "1.0.0", "callStackTree": { "callStacks": [ { "threadAttributed": true, "callStackRootFrames": [ { "binaryUUID": "DC2EACEA-3D9C-3409-96C2-2DF9C89AD19D", "offsetIntoBinaryTextSegment": 6917586944, "sampleCount": 1, "subFrames": [ { "binaryUUID": "DC2EACEA-3D9C-3409-96C2-2DF9C89AD19D", "offsetIntoBinaryTextSegment": 6917586944, "sampleCount": 1, "subFrames": [ { "binaryUUID": "DC2EACEA-3D9C-3409-96C2-2DF9C89AD19D", "offsetIntoBinaryTextSegment": 6917586944, "sampleCount": 1, "subFrames": [ { "binaryUUID": "35463E49-9534-3644-B993-2A73C287A143", "offsetIntoBinaryTextSegment": 4329963520, "sampleCount": 1, "binaryName": "demo", "address": 4333717704 }]
I tried to symbolicate the the data, by executing commands:
atos -arch arm64e -o /Users/***/Downloads/!dsym-4/demo.app.dSYM/Contents/Resources/DWARF/demo 4333717704
But I can't find the crash stack and the result returned is
4333717704
the DSYM file uuid is
UUID: 35463E49-9534-3644-B993-2A73C287A143 (arm64) /Users/***/Downloads/!dsym-3/demo.app.dSYM/Contents/Resources/DWARF/demo
How should the stack returned by MetrickIt be symbolized? Who can tell me very grateful