Delve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

Best way to show a popoverTip only when its anchor view is actually scrolled into view?
I have a section near the bottom of a ScrollView / LazyVStack. I want to show a popoverTip anchored to a button in that section, but only once the user has actually scrolled to it not on view load (otherwise the tip shows floating at the bottom of the screen). I tried to use onAppear but it fires as soon as the view is inserted into the hierarchy which on a LazyVStack can happen slightly before the view is truly in the viewport. I fell back to using onScrollVisibilityChange to write the @Parameter only when the section is actually visible: .onScrollVisibilityChange { isVisible in MyTip.sectionVisible = isVisible } This correctly gates visibility, but on some older devices I noticed that writing/reading @Parameter mid-scroll causes hitches. Is there a recommended TipKit pattern for this use case: showing a popoverTip only when its anchor has been scrolled into view that doesn't require a reactive write during active scroll? thanks
1
0
172
Jun ’26
Bluetooth Serial Throughput / MTU using CoreBluetooth and Embedded IoT Accessory
Currently we are working on an IoT Accessory for Industrial Control connecting an iPadOS to an ESP32 bridge to ModBus/CanBus using CoreBluetooth. We are concern about the Maximum Payload Size (MTU Limits) on Bluetooth as we need to send and receive long strings of ModBus/CanBus commands and responses. How to best use CoreBluetooth to ensure that the serial stream is reliable and smooth. As the Maximum Payload Size (MTU Limits) will affect the baud rate which we need to sync with the ModBus/CanBus on the other end, what techniques we can use to ensure the stable connection so that this CoreBluetooth link doesn't become a bottleneck. Are there any best practices we should be using or are we over thinking a simple Bluetooth Serial Characteristic
3
0
255
Jun ’26
Can I reset all tip values after an app launch?
Is there a way to expose to users a reset all tips after tip center is setup? Think a 'help' 'faq' or 'onboarding' where the user might want to see it again during the current app run, not after the next launch. I didn't see anything like this back in 2024 when I wrote this feedback so I assume it isn't a supported workflow with the current API. FB14080356
1
0
163
Jun ’26
Get a launch agent to use Bluetooth
My app includes a menu bar icon that shows the status of a bluetooth connection. How can I make this app and launch it when a user logs in? Does the launch agent need to then launch a GUI App? Can the launch agent get the permission to use bluetooth or does that require a GUI App?
3
0
225
Jun ’26
Tips and Tricks for TipKit
My designers like TipKit, especially the newer flavor we can control the content. What are some best practices or tips and tricks to share with product owners when designing around what the framework is capable of doing? Concepts that might be relevant: Onboarding FAQ Progressive disclosure of new features HELP / support workflows
1
0
200
Jun ’26
How to control the location in the Bluetooth prompt for educational and training guides
I want my team to be able to take screenshots of the app to produce training and support material for our app users. Is there any way, when connected to Xcode, to influence the location and the devices that show up in the TCC prompt? I don't want a screenshot of a teammate's work remote location to land in our docs. Like if our app connects to a specific kind of sensor to have that also show up in the picker and not show 'Apple TV' and the other apple devices that are named, nearby, and frequently connected to the device. FB14768675
1
0
184
Jun ’26
Is there any way to direct the user to the Bluetooth Settings page?
What is the best way for an app to deep link a user to the Bluetooth Settings page in the Settings app? For various reasons, 'go to bluetooth settings' is easier said than done for some users. I don't know of any public settings app URLs to send the users to the Bluetooth page. If using ASK it is in your apps' settings slice, but if not using ASK I don't have an answer. FB20224140
1
0
162
Jun ’26
Request for updated documentation in MetricKit and StateReporting
The new MetricKit and StateReporting APIs look great. The names of the Swift-first API conflicts with a lot of what I’ve written to do custom decoding (CrashDiagnostic —> MetricKit.CrashDiagnsotic and MetricKitModels.CrashDiagnostic). Job well done. Very clean API and reminds me of enum cases generated from Swift OpenAPI Generator, good stuff. Since there were no 1:1 labs this year for power and performance, I thought I’d send over my feedback for open discussion on the forums. This post is mostly centered around documentation and clarification. FB23019810 - Multiple metric and diagnostic pipeline design. What is the recommended implementation if I have two destinations that want the exact same domain scope. Two managers? A single manager with multiple async streams? Some API like HealthKit recommend a single HKHealthStore, is there any downside to creating many managers, or conversely, creating many async streams for metrics and diagnostics? FB23019316 - The new sample code shows mxSignpost. Is there any reason why we should not be using OSSignposter backed with a MetricKit OSLog handle? The API is more expressive and can handle wrapping closures P.S. see FB22413384 to hopefully enhance OSSignposter with an async func variant FB23020182 - MetricKit deprecations seem off and availability of the new API is missing from macOS and visionOS too. Can you clarify what the docs should show for deprecation? Can you clarify what the docs should show for availability of the new API? FB23051890 - Regarding StateReporting, I understand there is a sanity limit for how one would slice up the metrics per the video commentary. Too many dimensions the data becomes hard to associate with actual improvements to be made. Is there a limit developers should stay clear of? When using the StateReporting API, what are the practical limits to the number of domains and metadata key/value pairs we can have? FB23051980 - I’m excited and ready to implement StateReporting, in all the places. Is it supported in extensions? Will the resulting state changes be included in MetricReport? Last I asked, MXMetricPayload didn’t capture extension data. Will the resulting state changes be included in DiagnosticReport? I do see MXDiagnosticPayload come through containing extension data, so hopefully yes. FB23051678 - I didn’t catch any session or documentation material about the usage around the volatile metadata in the StateReporting API. The docs state it is a fatalError to change the domain and stable metadata keys, that makes sense if that is how the composite key for uniqueness is being created. By the name volatile I assume it can, well change. What is the usage of the volatile metadata? What limitations exist around it if any? The ReportedState API doesn’t have any properties for volatile, is it meant to be received in reports? FB23051738 - There isn’t a StateReporting area path in Feedback Assistant. For now sending feedbacks to MetricKit team, but it is a different framework. I assume other new frameworks are also missing I haven’t confirmed yet. FB13904761, FB13819435, FB13221143, FB22362800 - I have a handful of feedbacks that were reporting anomalous data with payloads. The routine with most bug feedbacks is to capture a sysdiagnose. Any tips on doing that when the reports are coming in from the field or not being actively monitored on dev and test devices? I know this is unlikely to happen but putting it out there FB9931474 - MetricKit: Add API to trigger sysdiagnose programmatically FB23047674 - Add docs for StateReporting and the Xcode simulate MetricKit menu. What domains should be added to the managers to populate data in the simulated reports? FB23020088 - I dig the new memory diagnostic, I’m hoping to close out this feedback that requested it FB9972410. Based on the language in the session, I am leaning towards it is only for memory limit, not jetsam memory pressure. Can you clarify in the documentation which memory exits it is for? Thanks for making it all the way to the end. If better to split this up in different posts I can try to do that but overlapped with other conference calls at the moment.
3
0
227
Jun ’26
Attributing SDK performance/battery impact in production
Hi! I have a couple of questions around measuring SDK performance in production, especially battery impact (and related to this, Disk Read/Writes). For an SDK running in the wild, what resources or APIs would you recommend using to evaluate performance impact once the SDK is already deployed to real users? I understand that Instruments and local profiling are the right tools during development, but production introduces a much wider range of devices, OS versions, app behaviors, network conditions, and user patterns (in particular, because SDK goes into different types of apps) In particular, are there recommended ways to understand battery usage attributable to an SDK in production? How can we reason about whether a battery-related issue is actually caused by our SDK rather than by the host app, system behavior, networking conditions, or other third-party SDKs? Any guidance on recommended signals, best practices, or things to avoid when trying to attribute battery impact in production would be very helpful.
2
0
212
Jun ’26
API enhancement suggestions for MetricKit and StateReporting
I shared a handful of feedbacks regarding MetricKit and StateReporting documentation here: https://developer.apple.com/forums/thread/833079, this post focuses on API design feedback and enhancements. While you’re breaking the interface and the json schema version, there are a few more quality of life improvements that could be made. I’m sharing my feature request feedbacks for the new API here to encourage other devs to write similar feedbacks and share theirs too. So, what would you say is the best way to inspire and ask for new features in MetricKit? #filefeedback FB23023840 - MetricKit: Add 'id' or 'identifier' (UUID string) to the MetricReport and DiagnosticReport Just like an IPS crash file, I’d like each report to have a unique identifier. This will help when performing mass imports of payloads into analysis and visualization tools. FB23023481 - MetricKit: Update environment osVersion.platform to use the same string name values as App Store Connect API --> iPhone OS should be simply 'iOS' This is just a small QOL to keep naming consistent in related fields. One could even share code! FB23024453 - MetricKit: Make MetricReport and DiagnosticReport types conform to Equatable for convenience of comparing decoded reports against each other This is similar to the unique ID concept, but if you don’t want to add an ID or conformance to identifiable, this can be a very useful quick check for all of the type properties being the same or not for report uniqueness. FB23019500 - MetricKit: Update API of MetricReport to not allow a nil environment I know the metadata in the metrics is nullable, and if this is just a wrapper or conversion of that I get it, but, is it possible to make the environment for the MetricReport required? I think it is reasonable for all of the properties except the multiple app versions to detect in the MetricReporter type or what ever internals. The rest of the API change eliminated a whole cohort of nullable types and properties, I think this is the last one! FB23023396 - MetricKit / Xcode: Simulate MetricKit payloads with encodingKeyFormat set to default produces an empty string bundle identifier My first few simulated payloads had an empty string for the bundle identifier. I know that the metadata didn’t expose this property in the old API but the jsonRepresentation did. I don’t know if it is related to how it is computed in that legacy type or just a bug in the Xcode utility. FB23052965 - MetricKit: Create OpenAPI Spec for the JSON encoding representations of MetricReport and DiagnosticReport I will have to update the code in my dev tools app that analyzes and visualizes MetricKit payloads to support the new json format(s). It would be nice if all of this code could be generated using a tool like the Swift OpenAPI Generator. One major advantage is that anyone could create their decoding types fairly easily, and, updating to new versions with new metrics or diagnostic constructs would be a simple code generation effort. FB23019260 - MetricKit / Developer Documentation: Update the new MetricKit sample code to use swift lang version 6 and fix compile errors The days of @preconcurrency import MetricKit are gone! At least for the new types. The sample code still uses Swift 5. Small tweak but good to illustrate the API is fully sendable and ready for structured concurrency. FB19499083 - Add API to designate the ‘source’ of the install —> App Store, TestFlight, Xcode (ad-hoc, mdm, etc.) I use the ‘source’ to determine a priority and routing of metric payloads (soon to be metric/diagnostic reports). I’d like to see as part of the environment property, a designation to where the app came from. Now that the report types are fully codable I could just wrap to enrich it, and that is probably going to be a common workflow, but it would be great if the original type had it from the start. I don’t have a reliable way to distinguish MDM device-enrolled vs MDM user-enrolled, Xcode is easy —> #if DEBUG source = Xcode. FB23053458 - MetricKit / Developer Documentation: Update sample code to capture the async sequences and demonstrate cancellation under a user privacy switch showing privacy-by-design I have always found MetricKit to be an incredibly useful privacy-by-default and private-by-design developer instrumentation tool. The sample code could be updated to show developers they can and should cancel their report tasks if the user wants to not have their data collected. MetricKit is rather incompatible with Open Telemetry, but signposts do easily transfer to spans and traces. Apple’s swift-log, swift-metrics, and swift-distributed-tracing would make for some really interesting integrations with MetricKit as the backing store. No FB numbers yet, I need to think about this one more. Betas are installed, apps updated with reporter sequences, save to files app and hunting for bugs. Evident from the group lab, MetricKit and StateReporting are a significant milestone for app performance and observability. Looking forward to future updates and betas!
1
0
173
Jun ’26
How do I tell from looking at the Batter Usage metric in Xcode Organizer if I'm in good shape?
I'm having trouble knowing whether my app is in good shape for battery usage by looking at the Battery Usage pane in Xcode's Organizer. I have some questions: At the top under "On-Screen Battery Usage", it says "Normalized to the usage of the most recent version when unplugged (x minutes / day)". Is the number there represented by "x" how long users tend to have my app open per day? When looking at the colored segments of the usage, I'm showing "Display" as 85% or more of the area. Is that just the cost of keeping the display turned on? Does it go up or down based on things like animations, displaying complex images, etc? It would be great to have an example of some apps of different types that are good "battery usage" citizens and what their battery usage looks like on this screen.
1
0
152
Jun ’26
Contacts "Prefer Nicknames" / "Short Name" setting not respected in the Share Sheet suggestions row
I've filed this as a feedback report (FB22305448) and wanted to raise it here in case anyone else is seeing the same behaviour or can confirm. The Share Sheet's suggested-people row appears to ignore the system Contacts name-display settings. When a contact has a Nickname set, that Nickname is shown in the sharing suggestions even when nicknames are explicitly turned off. Settings state Under Settings › Contacts › Short Name, both toggles are off: Short Name — Off Prefer Nicknames — Off With these off, the rest of the system (Contacts app, Messages conversation list, Mail, etc.) correctly shows the contact's full/short name rather than the Nickname. Steps to reproduce Open a contact and add a Nickname (e.g. contact "John Smith" with Nickname "JJ"). Go to Settings › Contacts › Short Name and ensure both Short Name and Prefer Nicknames are off. Open Photos, select a photo, and tap Share. Look at the suggested-people row at the top of the Share Sheet (the iMessage/AirDrop suggestions). Expected behaviour With Prefer Nicknames off, the suggestion should display the contact's full name (or short name if Short Name were enabled) — i.e. "John Smith", consistent with every other part of the system. Actual behaviour The Share Sheet suggestion shows the Nickname ("JJ") regardless of the Contacts setting. The setting is not honoured in this surface. Notes Reproducible every time. The Nickname is shown only in the Share Sheet suggestions row; other system surfaces respect the setting correctly, which points to the Share Sheet / suggestions component reading the contact's display name without applying the user's nickname preference. Feedback ID: FB22305448 Has anyone else run into this, or found a workaround short of removing the Nickname from the contact?
0
0
95
Jun ’26
CrashReporterExtension runtime capabilities and limitations
The documentation suggests that you can transfer files out of the crash reporting extension but it doesn’t outline if there are any gotchas to watch out for. Are there any limitations to this? Does it have full network access? Are app groups and keychain groups fully supported? Does the extension have a memory footprint limit we should watch out for? What is the lifecycle of the callback, what Is a reasonable amount of time to plan our implementation to do its work and be done within? 10 seconds? 30? And so on.
1
0
207
Jun ’26
Best way to show a popoverTip only when its anchor view is actually scrolled into view?
I have a section near the bottom of a ScrollView / LazyVStack. I want to show a popoverTip anchored to a button in that section, but only once the user has actually scrolled to it not on view load (otherwise the tip shows floating at the bottom of the screen). I tried to use onAppear but it fires as soon as the view is inserted into the hierarchy which on a LazyVStack can happen slightly before the view is truly in the viewport. I fell back to using onScrollVisibilityChange to write the @Parameter only when the section is actually visible: .onScrollVisibilityChange { isVisible in MyTip.sectionVisible = isVisible } This correctly gates visibility, but on some older devices I noticed that writing/reading @Parameter mid-scroll causes hitches. Is there a recommended TipKit pattern for this use case: showing a popoverTip only when its anchor has been scrolled into view that doesn't require a reactive write during active scroll? thanks
Replies
1
Boosts
0
Views
172
Activity
Jun ’26
Bluetooth Serial Throughput / MTU using CoreBluetooth and Embedded IoT Accessory
Currently we are working on an IoT Accessory for Industrial Control connecting an iPadOS to an ESP32 bridge to ModBus/CanBus using CoreBluetooth. We are concern about the Maximum Payload Size (MTU Limits) on Bluetooth as we need to send and receive long strings of ModBus/CanBus commands and responses. How to best use CoreBluetooth to ensure that the serial stream is reliable and smooth. As the Maximum Payload Size (MTU Limits) will affect the baud rate which we need to sync with the ModBus/CanBus on the other end, what techniques we can use to ensure the stable connection so that this CoreBluetooth link doesn't become a bottleneck. Are there any best practices we should be using or are we over thinking a simple Bluetooth Serial Characteristic
Replies
3
Boosts
0
Views
255
Activity
Jun ’26
Discovering Core Bluetooth Classic devices
Core Bluetooth Classic seems to limit the number of UUIDs we can scan for. Is there a way to do a wildcard scan?
Replies
2
Boosts
1
Views
240
Activity
Jun ’26
L2Cap PSM Service UUID, PSM UUID vs BLE Service UUID, Characteristic UUID
Is the PSM UUID format is less stringent than the BLE Service and Characteristic UUID? In our BLE cluster we broadcast both for different tasks... is a GATT and L2Cap mixed cluster of Apple devices ok?
Replies
7
Boosts
0
Views
268
Activity
Jun ’26
Limits to concurrent peripheral channel sounding calls
Is there any software or hardware limit to the number of peripherals that can have the sounding running on at the same time? I see there are two new CBErrors, I didn't catch a reference in the video or docs for which error we get when. Can you share some details on that?
Replies
1
Boosts
2
Views
263
Activity
Jun ’26
Which Apple Devices support channel sounding?
UWB is now finally on many devices that run the latest OS. To help understand availability in the field, which devices support this feature today? App Store has metrics on OS versions, but not device models. But knowing which models support it we can look in our device data.
Replies
2
Boosts
0
Views
270
Activity
Jun ’26
Can I reset all tip values after an app launch?
Is there a way to expose to users a reset all tips after tip center is setup? Think a 'help' 'faq' or 'onboarding' where the user might want to see it again during the current app run, not after the next launch. I didn't see anything like this back in 2024 when I wrote this feedback so I assume it isn't a supported workflow with the current API. FB14080356
Replies
1
Boosts
0
Views
163
Activity
Jun ’26
Get a launch agent to use Bluetooth
My app includes a menu bar icon that shows the status of a bluetooth connection. How can I make this app and launch it when a user logs in? Does the launch agent need to then launch a GUI App? Can the launch agent get the permission to use bluetooth or does that require a GUI App?
Replies
3
Boosts
0
Views
225
Activity
Jun ’26
Tips and Tricks for TipKit
My designers like TipKit, especially the newer flavor we can control the content. What are some best practices or tips and tricks to share with product owners when designing around what the framework is capable of doing? Concepts that might be relevant: Onboarding FAQ Progressive disclosure of new features HELP / support workflows
Replies
1
Boosts
0
Views
200
Activity
Jun ’26
Does NI now support DIRECTION finding for UWB in more recent iPhone models?
Given that Apple is a Sponsor level member of the FIRa Consortium (on UWB interoperability) and the FIRa 3.0 spec has been released, are there any improvements in the Nearby Interaction framework for UWB direction tracking? It appears that NI returns null for direction-found with third-party UWB device currently.
Replies
0
Boosts
1
Views
151
Activity
Jun ’26
How to control the location in the Bluetooth prompt for educational and training guides
I want my team to be able to take screenshots of the app to produce training and support material for our app users. Is there any way, when connected to Xcode, to influence the location and the devices that show up in the TCC prompt? I don't want a screenshot of a teammate's work remote location to land in our docs. Like if our app connects to a specific kind of sensor to have that also show up in the picker and not show 'Apple TV' and the other apple devices that are named, nearby, and frequently connected to the device. FB14768675
Replies
1
Boosts
0
Views
184
Activity
Jun ’26
Can I pair an iPhone acting as central with my Mac acting as a peripheral?
When I try to use encrypted notification, setNotify always fails on the central side.
Replies
1
Boosts
0
Views
150
Activity
Jun ’26
Can my app prevent other apps from connecting to my accessory
Is there any way for my app when connecting normally, or through ASK, to obtain an exclusive lock against my devices? Or can I register my company identifier with Apple to only allow apps made by my company to connect to our devices? FB17823898
Replies
1
Boosts
0
Views
192
Activity
Jun ’26
Is there any way to direct the user to the Bluetooth Settings page?
What is the best way for an app to deep link a user to the Bluetooth Settings page in the Settings app? For various reasons, 'go to bluetooth settings' is easier said than done for some users. I don't know of any public settings app URLs to send the users to the Bluetooth page. If using ASK it is in your apps' settings slice, but if not using ASK I don't have an answer. FB20224140
Replies
1
Boosts
0
Views
162
Activity
Jun ’26
Request for updated documentation in MetricKit and StateReporting
The new MetricKit and StateReporting APIs look great. The names of the Swift-first API conflicts with a lot of what I’ve written to do custom decoding (CrashDiagnostic —> MetricKit.CrashDiagnsotic and MetricKitModels.CrashDiagnostic). Job well done. Very clean API and reminds me of enum cases generated from Swift OpenAPI Generator, good stuff. Since there were no 1:1 labs this year for power and performance, I thought I’d send over my feedback for open discussion on the forums. This post is mostly centered around documentation and clarification. FB23019810 - Multiple metric and diagnostic pipeline design. What is the recommended implementation if I have two destinations that want the exact same domain scope. Two managers? A single manager with multiple async streams? Some API like HealthKit recommend a single HKHealthStore, is there any downside to creating many managers, or conversely, creating many async streams for metrics and diagnostics? FB23019316 - The new sample code shows mxSignpost. Is there any reason why we should not be using OSSignposter backed with a MetricKit OSLog handle? The API is more expressive and can handle wrapping closures P.S. see FB22413384 to hopefully enhance OSSignposter with an async func variant FB23020182 - MetricKit deprecations seem off and availability of the new API is missing from macOS and visionOS too. Can you clarify what the docs should show for deprecation? Can you clarify what the docs should show for availability of the new API? FB23051890 - Regarding StateReporting, I understand there is a sanity limit for how one would slice up the metrics per the video commentary. Too many dimensions the data becomes hard to associate with actual improvements to be made. Is there a limit developers should stay clear of? When using the StateReporting API, what are the practical limits to the number of domains and metadata key/value pairs we can have? FB23051980 - I’m excited and ready to implement StateReporting, in all the places. Is it supported in extensions? Will the resulting state changes be included in MetricReport? Last I asked, MXMetricPayload didn’t capture extension data. Will the resulting state changes be included in DiagnosticReport? I do see MXDiagnosticPayload come through containing extension data, so hopefully yes. FB23051678 - I didn’t catch any session or documentation material about the usage around the volatile metadata in the StateReporting API. The docs state it is a fatalError to change the domain and stable metadata keys, that makes sense if that is how the composite key for uniqueness is being created. By the name volatile I assume it can, well change. What is the usage of the volatile metadata? What limitations exist around it if any? The ReportedState API doesn’t have any properties for volatile, is it meant to be received in reports? FB23051738 - There isn’t a StateReporting area path in Feedback Assistant. For now sending feedbacks to MetricKit team, but it is a different framework. I assume other new frameworks are also missing I haven’t confirmed yet. FB13904761, FB13819435, FB13221143, FB22362800 - I have a handful of feedbacks that were reporting anomalous data with payloads. The routine with most bug feedbacks is to capture a sysdiagnose. Any tips on doing that when the reports are coming in from the field or not being actively monitored on dev and test devices? I know this is unlikely to happen but putting it out there FB9931474 - MetricKit: Add API to trigger sysdiagnose programmatically FB23047674 - Add docs for StateReporting and the Xcode simulate MetricKit menu. What domains should be added to the managers to populate data in the simulated reports? FB23020088 - I dig the new memory diagnostic, I’m hoping to close out this feedback that requested it FB9972410. Based on the language in the session, I am leaning towards it is only for memory limit, not jetsam memory pressure. Can you clarify in the documentation which memory exits it is for? Thanks for making it all the way to the end. If better to split this up in different posts I can try to do that but overlapped with other conference calls at the moment.
Replies
3
Boosts
0
Views
227
Activity
Jun ’26
Attributing SDK performance/battery impact in production
Hi! I have a couple of questions around measuring SDK performance in production, especially battery impact (and related to this, Disk Read/Writes). For an SDK running in the wild, what resources or APIs would you recommend using to evaluate performance impact once the SDK is already deployed to real users? I understand that Instruments and local profiling are the right tools during development, but production introduces a much wider range of devices, OS versions, app behaviors, network conditions, and user patterns (in particular, because SDK goes into different types of apps) In particular, are there recommended ways to understand battery usage attributable to an SDK in production? How can we reason about whether a battery-related issue is actually caused by our SDK rather than by the host app, system behavior, networking conditions, or other third-party SDKs? Any guidance on recommended signals, best practices, or things to avoid when trying to attribute battery impact in production would be very helpful.
Replies
2
Boosts
0
Views
212
Activity
Jun ’26
API enhancement suggestions for MetricKit and StateReporting
I shared a handful of feedbacks regarding MetricKit and StateReporting documentation here: https://developer.apple.com/forums/thread/833079, this post focuses on API design feedback and enhancements. While you’re breaking the interface and the json schema version, there are a few more quality of life improvements that could be made. I’m sharing my feature request feedbacks for the new API here to encourage other devs to write similar feedbacks and share theirs too. So, what would you say is the best way to inspire and ask for new features in MetricKit? #filefeedback FB23023840 - MetricKit: Add 'id' or 'identifier' (UUID string) to the MetricReport and DiagnosticReport Just like an IPS crash file, I’d like each report to have a unique identifier. This will help when performing mass imports of payloads into analysis and visualization tools. FB23023481 - MetricKit: Update environment osVersion.platform to use the same string name values as App Store Connect API --> iPhone OS should be simply 'iOS' This is just a small QOL to keep naming consistent in related fields. One could even share code! FB23024453 - MetricKit: Make MetricReport and DiagnosticReport types conform to Equatable for convenience of comparing decoded reports against each other This is similar to the unique ID concept, but if you don’t want to add an ID or conformance to identifiable, this can be a very useful quick check for all of the type properties being the same or not for report uniqueness. FB23019500 - MetricKit: Update API of MetricReport to not allow a nil environment I know the metadata in the metrics is nullable, and if this is just a wrapper or conversion of that I get it, but, is it possible to make the environment for the MetricReport required? I think it is reasonable for all of the properties except the multiple app versions to detect in the MetricReporter type or what ever internals. The rest of the API change eliminated a whole cohort of nullable types and properties, I think this is the last one! FB23023396 - MetricKit / Xcode: Simulate MetricKit payloads with encodingKeyFormat set to default produces an empty string bundle identifier My first few simulated payloads had an empty string for the bundle identifier. I know that the metadata didn’t expose this property in the old API but the jsonRepresentation did. I don’t know if it is related to how it is computed in that legacy type or just a bug in the Xcode utility. FB23052965 - MetricKit: Create OpenAPI Spec for the JSON encoding representations of MetricReport and DiagnosticReport I will have to update the code in my dev tools app that analyzes and visualizes MetricKit payloads to support the new json format(s). It would be nice if all of this code could be generated using a tool like the Swift OpenAPI Generator. One major advantage is that anyone could create their decoding types fairly easily, and, updating to new versions with new metrics or diagnostic constructs would be a simple code generation effort. FB23019260 - MetricKit / Developer Documentation: Update the new MetricKit sample code to use swift lang version 6 and fix compile errors The days of @preconcurrency import MetricKit are gone! At least for the new types. The sample code still uses Swift 5. Small tweak but good to illustrate the API is fully sendable and ready for structured concurrency. FB19499083 - Add API to designate the ‘source’ of the install —> App Store, TestFlight, Xcode (ad-hoc, mdm, etc.) I use the ‘source’ to determine a priority and routing of metric payloads (soon to be metric/diagnostic reports). I’d like to see as part of the environment property, a designation to where the app came from. Now that the report types are fully codable I could just wrap to enrich it, and that is probably going to be a common workflow, but it would be great if the original type had it from the start. I don’t have a reliable way to distinguish MDM device-enrolled vs MDM user-enrolled, Xcode is easy —> #if DEBUG source = Xcode. FB23053458 - MetricKit / Developer Documentation: Update sample code to capture the async sequences and demonstrate cancellation under a user privacy switch showing privacy-by-design I have always found MetricKit to be an incredibly useful privacy-by-default and private-by-design developer instrumentation tool. The sample code could be updated to show developers they can and should cancel their report tasks if the user wants to not have their data collected. MetricKit is rather incompatible with Open Telemetry, but signposts do easily transfer to spans and traces. Apple’s swift-log, swift-metrics, and swift-distributed-tracing would make for some really interesting integrations with MetricKit as the backing store. No FB numbers yet, I need to think about this one more. Betas are installed, apps updated with reporter sequences, save to files app and hunting for bugs. Evident from the group lab, MetricKit and StateReporting are a significant milestone for app performance and observability. Looking forward to future updates and betas!
Replies
1
Boosts
0
Views
173
Activity
Jun ’26
How do I tell from looking at the Batter Usage metric in Xcode Organizer if I'm in good shape?
I'm having trouble knowing whether my app is in good shape for battery usage by looking at the Battery Usage pane in Xcode's Organizer. I have some questions: At the top under "On-Screen Battery Usage", it says "Normalized to the usage of the most recent version when unplugged (x minutes / day)". Is the number there represented by "x" how long users tend to have my app open per day? When looking at the colored segments of the usage, I'm showing "Display" as 85% or more of the area. Is that just the cost of keeping the display turned on? Does it go up or down based on things like animations, displaying complex images, etc? It would be great to have an example of some apps of different types that are good "battery usage" citizens and what their battery usage looks like on this screen.
Replies
1
Boosts
0
Views
152
Activity
Jun ’26
Contacts "Prefer Nicknames" / "Short Name" setting not respected in the Share Sheet suggestions row
I've filed this as a feedback report (FB22305448) and wanted to raise it here in case anyone else is seeing the same behaviour or can confirm. The Share Sheet's suggested-people row appears to ignore the system Contacts name-display settings. When a contact has a Nickname set, that Nickname is shown in the sharing suggestions even when nicknames are explicitly turned off. Settings state Under Settings › Contacts › Short Name, both toggles are off: Short Name — Off Prefer Nicknames — Off With these off, the rest of the system (Contacts app, Messages conversation list, Mail, etc.) correctly shows the contact's full/short name rather than the Nickname. Steps to reproduce Open a contact and add a Nickname (e.g. contact "John Smith" with Nickname "JJ"). Go to Settings › Contacts › Short Name and ensure both Short Name and Prefer Nicknames are off. Open Photos, select a photo, and tap Share. Look at the suggested-people row at the top of the Share Sheet (the iMessage/AirDrop suggestions). Expected behaviour With Prefer Nicknames off, the suggestion should display the contact's full name (or short name if Short Name were enabled) — i.e. "John Smith", consistent with every other part of the system. Actual behaviour The Share Sheet suggestion shows the Nickname ("JJ") regardless of the Contacts setting. The setting is not honoured in this surface. Notes Reproducible every time. The Nickname is shown only in the Share Sheet suggestions row; other system surfaces respect the setting correctly, which points to the Share Sheet / suggestions component reading the contact's display name without applying the user's nickname preference. Feedback ID: FB22305448 Has anyone else run into this, or found a workaround short of removing the Nickname from the contact?
Replies
0
Boosts
0
Views
95
Activity
Jun ’26
CrashReporterExtension runtime capabilities and limitations
The documentation suggests that you can transfer files out of the crash reporting extension but it doesn’t outline if there are any gotchas to watch out for. Are there any limitations to this? Does it have full network access? Are app groups and keychain groups fully supported? Does the extension have a memory footprint limit we should watch out for? What is the lifecycle of the callback, what Is a reasonable amount of time to plan our implementation to do its work and be done within? 10 seconds? 30? And so on.
Replies
1
Boosts
0
Views
207
Activity
Jun ’26